Explorar o código

Added a test for double variable with modf

Christophe Riccio %!s(int64=14) %!d(string=hai) anos
pai
achega
f0932fa9cc
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      test/core/core_func_common.cpp

+ 9 - 0
test/core/core_func_common.cpp

@@ -32,6 +32,15 @@ int test_modf()
 		Error += glm::all(glm::equalEpsilon(A, glm::vec4(0.1f, 0.2f, 0.5f, 0.7f), 0.00001f)) ? 0 : 1;
 	}
 
+	{
+		glm::dvec4 X(1.1, 1.2, 1.5, 1.7);
+		glm::dvec4 I(0.0);
+		glm::dvec4 A = glm::modf(X, I);
+
+		Error += I == glm::dvec4(1.0) ? 0 : 1;
+		Error += glm::all(glm::equalEpsilon(A, glm::dvec4(0.1, 0.2, 0.5, 0.7), 0.000000001)) ? 0 : 1;
+	}
+
 	{
 		double X(1.5);
 		double I(0.0);