diff --git a/test/gtx/gtx_norm.cpp b/test/gtx/gtx_norm.cpp index 38cef8c2..5d9e4f32 100644 --- a/test/gtx/gtx_norm.cpp +++ b/test/gtx/gtx_norm.cpp @@ -1,9 +1,28 @@ #define GLM_ENABLE_EXPERIMENTAL #include +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; }