Browse Source

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

Groove 7 years ago
parent
commit
27b5ddff2b
1 changed files with 7 additions and 7 deletions
  1. 7 7
      test/core/core_type_vec1.cpp

+ 7 - 7
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;