diff options
Diffstat (limited to 'compat/math.hpp')
-rw-r--r-- | compat/math.hpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compat/math.hpp b/compat/math.hpp index f05ebdc8..c5981cc2 100644 --- a/compat/math.hpp +++ b/compat/math.hpp @@ -1,18 +1,15 @@ #pragma once -#include "macros.hpp" - #include <cmath> #include <type_traits> template<typename t> -inline auto iround(t val) -> std::enable_if_t<std::is_floating_point_v<remove_cvref_t<t>>, int> +inline auto iround(t val) -> std::enable_if_t<std::is_floating_point_v<std::decay_t<t>>, int> { return (int)std::round(val); } template <typename t> -force_inline constexpr int signum(const t& x) { return x < t{0} ? -1 : 1; |