Math/Angle: Fix compilation under Linux
This commit is contained in:
parent
702b0cb7a4
commit
500ad417a7
|
|
@ -10,6 +10,7 @@
|
||||||
#include <Nazara/Core/String.hpp>
|
#include <Nazara/Core/String.hpp>
|
||||||
#include <Nazara/Math/Algorithm.hpp>
|
#include <Nazara/Math/Algorithm.hpp>
|
||||||
#include <Nazara/Math/Enums.hpp>
|
#include <Nazara/Math/Enums.hpp>
|
||||||
|
#include <ostream>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ namespace Nz
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void SinCos(std::enable_if_t<std::is_same<T, float>::value, float> x, float* s, float* cos)
|
void SinCos(std::enable_if_t<std::is_same<T, float>::value, float> x, float* s, float* c)
|
||||||
{
|
{
|
||||||
::sincosf(x, s, c);
|
::sincosf(x, s, c);
|
||||||
}
|
}
|
||||||
|
|
@ -228,7 +228,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
void Angle<Unit, T>::Normalize()
|
void Angle<Unit, T>::Normalize()
|
||||||
{
|
{
|
||||||
constexpr T limit = Detail::AngleUtils<Unit>::GetLimit<T>();
|
constexpr T limit = Detail::AngleUtils<Unit>::template GetLimit<T>();
|
||||||
constexpr T twoLimit = limit * T(2);
|
constexpr T twoLimit = limit * T(2);
|
||||||
|
|
||||||
angle = std::fmod(angle, twoLimit);
|
angle = std::fmod(angle, twoLimit);
|
||||||
|
|
@ -404,7 +404,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
bool Angle<Unit, T>::operator==(const Angle& other) const
|
bool Angle<Unit, T>::operator==(const Angle& other) const
|
||||||
{
|
{
|
||||||
return NumberEquals(angle, other.angle, Detail::AngleUtils<Unit>::GetEpsilon<T>());
|
return NumberEquals(angle, other.angle, Detail::AngleUtils<Unit>::template GetEpsilon<T>());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -416,7 +416,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
bool Angle<Unit, T>::operator!=(const Angle& other) const
|
bool Angle<Unit, T>::operator!=(const Angle& other) const
|
||||||
{
|
{
|
||||||
return !NumberEquals(angle, other.angle, Detail::AngleUtils<Unit>::GetEpsilon<T>());
|
return !NumberEquals(angle, other.angle, Detail::AngleUtils<Unit>::template GetEpsilon<T>());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue