diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-12-02 08:19:17 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-12-02 08:22:08 +0100 |
commit | a46f6d07c5f8c6d65940b2d8ec62535ee1983315 (patch) | |
tree | f6357ed46df923681b11b2f8f904fe02d3d327cc /compat | |
parent | a07c61da300332a41034969fc6d2ca5dbdbc1448 (diff) |
compat/math: simplify for inlining
Diffstat (limited to 'compat')
-rw-r--r-- | compat/math-imports.hpp | 2 |
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> |