sources/basics.h

changeset 99
f9f73eeba3b7
parent 93
1ea012a6e1ec
child 109
e4966d7e615d
equal deleted inserted replaced
98:4f0f0b1b8e0b 99:f9f73eeba3b7
71 BEGIN_ZFC_NAMESPACE 71 BEGIN_ZFC_NAMESPACE
72 72
73 template<typename T> 73 template<typename T>
74 T min (T a, T b) 74 T min (T a, T b)
75 { 75 {
76 return (a < b) ? b : a; 76 return (a < b) ? a : b;
77 } 77 }
78 78
79 template<typename T> 79 template<typename T>
80 T max (T a, T b) 80 T max (T a, T b)
81 { 81 {
82 return (a > b) ? b : a; 82 return (a > b) ? a : b;
83 } 83 }
84 84
85 template<typename T> 85 template<typename T>
86 T clamp (T a, T b, T c) 86 T clamp (T a, T b, T c)
87 { 87 {

mercurial