diff options
-rw-r--r-- | src/core/math_func.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/math_func.hpp b/src/core/math_func.hpp index 0d5c11893..63f21fd28 100644 --- a/src/core/math_func.hpp +++ b/src/core/math_func.hpp @@ -177,7 +177,7 @@ static inline int32 ClampToI32(const int64 a) */ static inline uint16 ClampToU16(const uint64 a) { - return min(a, 0xFFFF); + return (uint16)(a <= 0xFFFFU ? a : 0xFFFFU); } /** |