summaryrefslogtreecommitdiffhomepage
path: root/compat/math-imports.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-12-02 08:19:17 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-12-02 08:22:08 +0100
commita46f6d07c5f8c6d65940b2d8ec62535ee1983315 (patch)
treef6357ed46df923681b11b2f8f904fe02d3d327cc /compat/math-imports.hpp
parenta07c61da300332a41034969fc6d2ca5dbdbc1448 (diff)
compat/math: simplify for inlining
Diffstat (limited to 'compat/math-imports.hpp')
-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>