mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 04:31:47 +00:00
29 lines
427 B
C++
29 lines
427 B
C++
#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;
|
|
}
|