snake/include/Math-util.h

9 lines
196 B
C++

namespace Math
{
template<typename T, typename U, typename V>
inline T max(U first, V second)
{
return static_cast<T>(static_cast<T>(first) >= static_cast<T>(second) ? first : second);
}
}