Added a test for double variable with modf

This commit is contained in:
Christophe Riccio 2011-11-14 12:40:55 +00:00
parent f46601489d
commit f0932fa9cc

View File

@ -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);