glm/test/ext/ext_matrix_relational.cpp
Christophe Riccio 78879c675c Refactor headers
2018-08-05 15:22:49 +02:00

34 lines
668 B
C++

#include <glm/ext/matrix_relational.hpp>
#include <glm/matrix_mat4x3.hpp>
#include <glm/vector_vec4.hpp>
int test_equal()
{
int Error = 0;
Error += glm::all(glm::equal(glm::mat4x3(1), glm::mat4x3(1), 0.001f)) ? 0 : 1;
Error += glm::all(glm::equal(glm::mat4x3(1), glm::mat4x3(2), glm::vec4(0.001f))) ? 1 : 0;
return Error;
}
int test_notEqual()
{
int Error = 0;
Error += !glm::any(glm::notEqual(glm::mat4x3(1), glm::mat4x3(1), 0.001f)) ? 0 : 1;
Error += !glm::any(glm::notEqual(glm::mat4x3(1), glm::mat4x3(2), glm::vec4(0.001f))) ? 1 : 0;
return Error;
}
int main()
{
int Error = 0;
Error += test_equal();
Error += test_notEqual();
return Error;
}