From 3aa6fb9efd4b34ab40bc57faeb87544cc74229d6 Mon Sep 17 00:00:00 2001 From: Lynix Date: Sun, 7 Jun 2015 15:19:37 +0200 Subject: [PATCH] Math/Algorithm: Fix Visual Studio error Former-commit-id: c426979b55e11db423f08a713cb41c7407886d02 --- include/Nazara/Math/Algorithm.hpp | 3 ++- include/Nazara/Math/Algorithm.inl | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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) {