diff options
Diffstat (limited to 'src/core/math_func.hpp')
-rw-r--r-- | src/core/math_func.hpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/math_func.hpp b/src/core/math_func.hpp index 48690ec58..e0b9dbc89 100644 --- a/src/core/math_func.hpp +++ b/src/core/math_func.hpp @@ -150,6 +150,7 @@ static FORCEINLINE T *AlignPtr(T *x, uint n) template <typename T> static FORCEINLINE T Clamp(const T a, const T min, const T max) { + assert(min <= max); if (a <= min) return min; if (a >= max) return max; return a; |