mirror of
https://github.com/g-truc/glm.git
synced 2024-11-23 01:14:34 +00:00
Add a CXX11-conditional test for exp2 precision with larger exponents
This commit is contained in:
parent
9e0c716372
commit
708a886bb0
@ -113,6 +113,12 @@ static int test_exp2()
|
|||||||
glm::vec4 E = glm::exp2(glm::vec4(4.f, 3.f, 2.f, 1.f));
|
glm::vec4 E = glm::exp2(glm::vec4(4.f, 3.f, 2.f, 1.f));
|
||||||
Error += glm::all(glm::epsilonEqual(E, glm::vec4(16.f, 8.f, 4.f, 2.f), 0.01f)) ? 0 : 1;
|
Error += glm::all(glm::epsilonEqual(E, glm::vec4(16.f, 8.f, 4.f, 2.f), 0.01f)) ? 0 : 1;
|
||||||
|
|
||||||
|
# if GLM_HAS_CXX11_STL
|
||||||
|
//large exponent
|
||||||
|
float F = glm::exp2(23.f);
|
||||||
|
Error += glm::epsilonEqual(F, 8388608.f, 0.01f) ? 0 : 1;
|
||||||
|
# endif
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user