Fixed error: comparing floating point with == or != is unsafe

master
Groove ago%!(EXTRA string=7 years)
parent b2ba0c317d
commit ef955b2bf5
  1. 4
      test/core/core_force_pure.cpp
  2. 4
      test/core/core_type_vec2.cpp

@ -112,8 +112,8 @@ int test_vec4_ctor()
# endif//GLM_SWIZZLE == GLM_SWIZZLE_OPERATOR
{
glm::vec4 A(1);
glm::vec4 B(1, 1, 1, 1);
glm::ivec4 A(1);
glm::ivec4 B(1, 1, 1, 1);
Error += A == B ? 0 : 1;
}

@ -18,8 +18,8 @@ static int test_operators()
int Error = 0;
{
glm::vec2 A(1.0f);
glm::vec2 B(1.0f);
glm::ivec2 A(1.0f);
glm::ivec2 B(1.0f);
Error += A != B ? 1 : 0;
Error += A == B ? 0 : 1;
}

Loading…
Cancel
Save