Add testing of lMaxNorm.

This commit is contained in:
Liam Adams 2019-07-19 18:11:07 +01:00
parent 2400954df2
commit a78024d2bf

View File

@ -1,9 +1,28 @@
#define GLM_ENABLE_EXPERIMENTAL #define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/norm.hpp> #include <glm/gtx/norm.hpp>
int test_lMaxNorm()
{
int Error(0);
{
float norm = glm::lMaxNorm(glm::vec3(-1, -2, -3));
Error += glm::epsilonEqual(norm, 3.f, 0.00001f) ? 0 : 1;
}
{
float norm = glm::lMaxNorm(glm::vec3(2, 3, 1));
Error += glm::epsilonEqual(norm, 3.f, 0.00001f) ? 0 : 1;
}
return Error;
}
int main() int main()
{ {
int Error(0); int Error(0);
Error += test_lMaxNorm();
return Error; return Error;
} }