Merge branch 'master' into NDK
Conflicts: include/Nazara/Core/Algorithm.inl include/Nazara/Core/ByteArray.hpp include/Nazara/Math/Algorithm.inl src/Nazara/Graphics/SkyboxBackground.cpp Former-commit-id: 42f52f71989fa805f69527fd07edb8405df06566
This commit is contained in:
@@ -337,9 +337,10 @@ bool NzNumberEquals(T a, T b)
|
||||
template<typename T>
|
||||
bool NzNumberEquals(T a, T b, T maxDifference)
|
||||
{
|
||||
std::pair<const T&, const T&> minmax = std::minmax(a, b);
|
||||
T diff = minmax.second - minmax.first;
|
||||
if (b > a)
|
||||
std::swap(a, b);
|
||||
|
||||
T diff = a - b;
|
||||
return diff <= maxDifference;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user