Fix glm::acsch tests

This commit is contained in:
Christophe 2020-11-26 11:14:54 +01:00
parent db8b101617
commit 8693d06297
2 changed files with 7 additions and 4 deletions

View File

@ -118,8 +118,8 @@ static int test_acsch()
{
int Error = 0;
Error += glm::acsch(0.0001) > 10000.0 ? 0 : 1;
Error += glm::acsch(-0.0001) < -10000.0 ? 0 : 1;
Error += glm::acsch(0.01) > 1.0 ? 0 : 1;
Error += glm::acsch(-0.01) < -1.0 ? 0 : 1;
Error += glm::equal(glm::acsch(100.0), 0.0, 0.01) ? 0 : 1;
Error += glm::equal(glm::acsch(-100.0), 0.0, 0.01) ? 0 : 1;

View File

@ -130,8 +130,11 @@ static int test_acsch()
{
int Error = 0;
Error += glm::acsch(glm::dvec1(0.0001)).x > 10000.0 ? 0 : 1;
Error += glm::acsch(glm::dvec1(-0.0001)).x < -10000.0 ? 0 : 1;
glm::dvec1 const a(glm::acsch(glm::dvec1(0.01)));
Error += a.x > 1.0 ? 0 : 1;
glm::dvec1 const b(glm::acsch(glm::dvec1(-0.01)));
Error += b.x < -1.0 ? 0 : 1;
Error += glm::all(glm::equal(glm::acsch(glm::dvec1(100.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1;
Error += glm::all(glm::equal(glm::acsch(glm::dvec1(-100.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1;