diff options
Diffstat (limited to 'core/src/Utils/Math.hpp')
-rw-r--r-- | core/src/Utils/Math.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/src/Utils/Math.hpp b/core/src/Utils/Math.hpp new file mode 100644 index 0000000..2d0c0cd --- /dev/null +++ b/core/src/Utils/Math.hpp @@ -0,0 +1,11 @@ +#pragma once + +namespace MathUtils { + +template <class T> +constexpr T Abs(T t) +{ + return t < 0 ? -t : t; +} + +} // namespace Math |