Added a test for double variable with modf

master
Christophe Riccio ago%!(EXTRA string=14 years)
parent f46601489d
commit f0932fa9cc
  1. 9
      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);

Loading…
Cancel
Save