#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include template static int test_equal() { typedef typename matType::value_type valType; valType const Epsilon(0.001f); valType const One(1); valType const Two(2); int Error = 0; Error += glm::all(glm::equal(matType(One), matType(One), Epsilon)) ? 0 : 1; Error += glm::all(glm::equal(matType(One), matType(Two), vecType(Epsilon))) ? 1 : 0; return Error; } template static int test_notEqual() { typedef typename matType::value_type valType; valType const Epsilon(0.001f); valType const One(1); valType const Two(2); int Error = 0; Error += !glm::any(glm::notEqual(matType(One), matType(One), Epsilon)) ? 0 : 1; Error += !glm::any(glm::notEqual(matType(One), matType(Two), vecType(Epsilon))) ? 1 : 0; return Error; } int main() { int Error = 0; Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_equal(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); Error += test_notEqual(); return Error; }