summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--compat/math-imports.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/math-imports.hpp b/compat/math-imports.hpp
index 1aea3ce6..4d8d5a5f 100644
--- a/compat/math-imports.hpp
+++ b/compat/math-imports.hpp
@@ -3,7 +3,7 @@
template <typename T>
static inline constexpr auto signum(T x)
{
- return (T() < x) - (x < T());
+ return x < T(0) ? -1 : 1;
}
#include <cmath>