diff --git a/include/Nazara/Math/Algorithm.hpp b/include/Nazara/Math/Algorithm.hpp index 9cd10ef59..070d048aa 100644 --- a/include/Nazara/Math/Algorithm.hpp +++ b/include/Nazara/Math/Algorithm.hpp @@ -46,7 +46,8 @@ unsigned int NzIntegralPow(unsigned int base, unsigned int exponent); template T NzLerp(T from, T to, T2 interpolation); template T NzMultiplyAdd(T x, T y, T z); template T NzNormalizeAngle(T angle); -template bool NzNumberEquals(T a, T b, T maxDifference = std::numeric_limits::epsilon()); +template bool NzNumberEquals(T a, T b); +template bool NzNumberEquals(T a, T b, T maxDifference); NzString NzNumberToString(long long number, nzUInt8 radix = 10); template T NzRadianToDegree(T radians); long long NzStringToNumber(NzString str, nzUInt8 radix = 10, bool* ok = nullptr); diff --git a/include/Nazara/Math/Algorithm.inl b/include/Nazara/Math/Algorithm.inl index efc371a4c..84bf10e6e 100644 --- a/include/Nazara/Math/Algorithm.inl +++ b/include/Nazara/Math/Algorithm.inl @@ -330,6 +330,12 @@ T NzNormalizeAngle(T angle) return angle - limit; } +template +bool NzNumberEquals(T a, T b) +{ + return NzNumberEquals(a, b, std::numeric_limits::epsilon()); +} + template bool NzNumberEquals(T a, T b, T maxDifference) {