mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 17:04:35 +00:00
Fix glm::acsch tests
This commit is contained in:
parent
db8b101617
commit
8693d06297
@ -118,8 +118,8 @@ static int test_acsch()
|
|||||||
{
|
{
|
||||||
int Error = 0;
|
int Error = 0;
|
||||||
|
|
||||||
Error += glm::acsch(0.0001) > 10000.0 ? 0 : 1;
|
Error += glm::acsch(0.01) > 1.0 ? 0 : 1;
|
||||||
Error += glm::acsch(-0.0001) < -10000.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;
|
||||||
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;
|
||||||
|
@ -130,8 +130,11 @@ static int test_acsch()
|
|||||||
{
|
{
|
||||||
int Error = 0;
|
int Error = 0;
|
||||||
|
|
||||||
Error += glm::acsch(glm::dvec1(0.0001)).x > 10000.0 ? 0 : 1;
|
glm::dvec1 const a(glm::acsch(glm::dvec1(0.01)));
|
||||||
Error += glm::acsch(glm::dvec1(-0.0001)).x < -10000.0 ? 0 : 1;
|
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;
|
||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user