diff options
Diffstat (limited to 'src/core/math_func.hpp')
-rw-r--r-- | src/core/math_func.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/math_func.hpp b/src/core/math_func.hpp index 6b91b3ddb..e2cc8b89c 100644 --- a/src/core/math_func.hpp +++ b/src/core/math_func.hpp @@ -192,7 +192,8 @@ static FORCEINLINE uint16 ClampToU16(const uint64 a) * @return The absolute difference between the given scalars */ template <typename T> -static FORCEINLINE T Delta(const T a, const T b) { +static FORCEINLINE T Delta(const T a, const T b) +{ return (a < b) ? b - a : a - b; } |