Fixed epsilon for half types

This commit is contained in:
Christophe Riccio
2012-11-06 02:26:31 +01:00
parent 1fb8bec873
commit bfec0e2388
4 changed files with 21 additions and 13 deletions

View File

@@ -20,31 +20,31 @@ int test_equal()
{
T A = glm::epsilon<T>();
T B = glm::epsilon<T>();
Error += glm::epsilonEqual(A, B, glm::epsilon<T>()) ? 0 : 1;
Error += glm::epsilonEqual(A, B, glm::epsilon<T>() * T(2)) ? 0 : 1;
}
{
T A(0);
T B = T(0) + glm::epsilon<T>();
Error += glm::epsilonEqual(A, B, glm::epsilon<T>()) ? 0 : 1;
Error += glm::epsilonEqual(A, B, glm::epsilon<T>() * T(2)) ? 0 : 1;
}
{
T A(0);
T B = T(0) - glm::epsilon<T>();
Error += glm::epsilonEqual(A, B, glm::epsilon<T>()) ? 0 : 1;
Error += glm::epsilonEqual(A, B, glm::epsilon<T>() * T(2)) ? 0 : 1;
}
{
T A = T(0) + glm::epsilon<T>();
T B = T(0);
Error += glm::epsilonEqual(A, B, glm::epsilon<T>()) ? 0 : 1;
Error += glm::epsilonEqual(A, B, glm::epsilon<T>() * T(2)) ? 0 : 1;
}
{
T A = T(0) - glm::epsilon<T>();
T B = T(0);
Error += glm::epsilonEqual(A, B, glm::epsilon<T>()) ? 0 : 1;
Error += glm::epsilonEqual(A, B, glm::epsilon<T>() * T(2)) ? 0 : 1;
}
return Error;