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

This commit is contained in:
Groove
2018-07-27 00:18:34 +02:00
parent af8964a78f
commit 27b5ddff2b

View File

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