diff options
Diffstat (limited to 'app/source/Cplt/Utils/Math.hpp')
-rw-r--r-- | app/source/Cplt/Utils/Math.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/source/Cplt/Utils/Math.hpp b/app/source/Cplt/Utils/Math.hpp new file mode 100644 index 0000000..da53da2 --- /dev/null +++ b/app/source/Cplt/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 MathUtils |