mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 02:04:35 +00:00
Fixed build
This commit is contained in:
parent
e1f44ea397
commit
bee480347c
@ -4,9 +4,9 @@
|
||||
#include <glm/common.hpp>
|
||||
|
||||
#if ((GLM_LANG & GLM_LANG_CXX11_FLAG) || (GLM_COMPILER & GLM_COMPILER_VC))
|
||||
# define GLM_NAN NAN
|
||||
# define GLM_NAN(T) NAN
|
||||
#else
|
||||
# define GLM_NAN (A / A)
|
||||
# define GLM_NAN(T) (static_cast<T>(0.0f) / static_cast<T>(0.0f))
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
@ -43,9 +43,8 @@ static int test_min_nan()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
T const A = static_cast<T>(0);
|
||||
T const B = static_cast<T>(1);
|
||||
T const N = static_cast<T>(GLM_NAN);
|
||||
T const N = static_cast<T>(GLM_NAN(T));
|
||||
Error += glm::isnan(glm::min(N, B)) ? 0 : 1;
|
||||
Error += !glm::isnan(glm::min(B, N)) ? 0 : 1;
|
||||
|
||||
@ -102,9 +101,8 @@ static int test_max_nan()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
T const A = static_cast<T>(0);
|
||||
T const B = static_cast<T>(1);
|
||||
T const N = static_cast<T>(GLM_NAN);
|
||||
T const N = static_cast<T>(GLM_NAN(T));
|
||||
Error += glm::isnan(glm::max(N, B)) ? 0 : 1;
|
||||
Error += !glm::isnan(glm::max(B, N)) ? 0 : 1;
|
||||
|
||||
@ -132,9 +130,8 @@ static int test_fmin()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
T const A = static_cast<T>(0);
|
||||
T const B = static_cast<T>(1);
|
||||
T const N = static_cast<T>(GLM_NAN);
|
||||
T const N = static_cast<T>(GLM_NAN(T));
|
||||
Error += glm::equal(glm::fmin(N, B), B, glm::epsilon<T>()) ? 0 : 1;
|
||||
Error += glm::equal(glm::fmin(B, N), B, glm::epsilon<T>()) ? 0 : 1;
|
||||
|
||||
@ -162,9 +159,8 @@ static int test_fmax()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
T const A = static_cast<T>(0);
|
||||
T const B = static_cast<T>(1);
|
||||
T const N = static_cast<T>(GLM_NAN);
|
||||
T const N = static_cast<T>(GLM_NAN(T));
|
||||
Error += glm::equal(glm::fmax(N, B), B, glm::epsilon<T>()) ? 0 : 1;
|
||||
Error += glm::equal(glm::fmax(B, N), B, glm::epsilon<T>()) ? 0 : 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user