Changes in src/helpers.hpp [e359a8:76102e]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/helpers.hpp
re359a8 r76102e 74 74 x = y; 75 75 y = tmp; 76 }; 77 78 /** returns greater of the two values. 79 * \param x first value 80 * \param y second value 81 * \return greater of the two (by operator>()) 82 */ 83 template <typename T> T Max(T x, T y) 84 { 85 if (x > y) 86 return x; 87 else return y; 88 }; 89 90 /** returns smaller of the two values. 91 * \param x first value 92 * \param y second value 93 * \return smaller of the two (by operator<()) 94 */ 95 template <typename T> T Min(T x, T y) 96 { 97 if (x < y) 98 return x; 99 else return y; 76 100 }; 77 101
Note:
See TracChangeset
for help on using the changeset viewer.