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

master
Groove ago%!(EXTRA string=7 years)
parent af8964a78f
commit 27b5ddff2b
  1. 14
      test/core/core_type_vec1.cpp

@ -9,10 +9,10 @@ static glm::vec1 g2(1);
int test_vec1_operators()
{
int Error(0);
int Error = 0;
glm::vec1 A(1.0f);
glm::vec1 B(1.0f);
glm::ivec1 A(1);
glm::ivec1 B(1);
{
bool R = A != B;
bool S = A == B;
@ -21,10 +21,10 @@ int test_vec1_operators()
}
{
A *= 1.0f;
B *= 1.0;
A += 1.0f;
B += 1.0;
A *= 1;
B *= 1;
A += 1;
B += 1;
bool R = A != B;
bool S = A == B;

Loading…
Cancel
Save