Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/helpers.hpp

    r76102e re359a8  
    7474  x = y;
    7575  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;
    10076};
    10177
Note: See TracChangeset for help on using the changeset viewer.