diff options
Diffstat (limited to 'compat/math-imports.hpp')
-rw-r--r-- | compat/math-imports.hpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/compat/math-imports.hpp b/compat/math-imports.hpp index ad70f361..e4175b16 100644 --- a/compat/math-imports.hpp +++ b/compat/math-imports.hpp @@ -1,10 +1,12 @@ #pragma once -#include <cmath> -#include <cinttypes> - -namespace otr_math +template <typename T> +static inline constexpr auto signum(T x) { + return (T() < x) - (x < T()); +} + +#include <cmath> using std::copysign; @@ -27,19 +29,20 @@ using std::tan; using std::round; using std::fmod; +#include <cinttypes> + using std::uintptr_t; using std::intptr_t; using std::int64_t; using std::int32_t; +using std::int8_t; using std::uint64_t; using std::uint32_t; +using std::uint8_t; -template <typename T> -static inline constexpr auto signum(T x) -{ - return (T() < x) - (x < T()); -} +#include <algorithm> -} // ns otr_math +using std::min; +using std::max; |