diff --git a/include/MyGAL/util.h b/include/MyGAL/util.h index 1a0411e..39b9329 100644 --- a/include/MyGAL/util.h +++ b/include/MyGAL/util.h @@ -21,22 +21,24 @@ namespace mygal { - template -constexpr T EPSILON = std::numeric_limits::epsilon(); +T EPSILON () +{ + return std::numeric_limits::epsilon (); +} // Almost predicates are easier to satisfy than the normal ones template -constexpr bool almostLower(T lhs, T rhs) noexcept +bool almostLower(T lhs, T rhs) { - return lhs <= rhs + EPSILON; + return lhs <= rhs + EPSILON(); } template -constexpr bool almostGreater(T lhs, T rhs) noexcept +bool almostGreater(T lhs, T rhs) { - return lhs >= rhs - EPSILON; + return lhs >= rhs - EPSILON(); } template @@ -62,13 +64,13 @@ constexpr bool almostBetween(T x, T a, T b) noexcept template constexpr bool strictlyLower(T lhs, T rhs) noexcept { - return lhs < rhs - EPSILON; + return lhs < rhs - EPSILON(); } template constexpr bool strictlyGreater(T lhs, T rhs) noexcept { - return lhs > rhs + EPSILON; + return lhs > rhs + EPSILON(); } template