mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 08:54:35 +00:00
Add testing of lMaxNorm.
This commit is contained in:
parent
2400954df2
commit
a78024d2bf
@ -1,9 +1,28 @@
|
||||
#define GLM_ENABLE_EXPERIMENTAL
|
||||
#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 Error(0);
|
||||
|
||||
Error += test_lMaxNorm();
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user