2018-08-01 10:10:27 +00:00
|
|
|
#include <glm/ext/scalar_relational.hpp>
|
|
|
|
|
|
|
|
int test_equal()
|
|
|
|
{
|
2018-08-07 12:46:56 +00:00
|
|
|
static_assert(glm::equal(1.01f, 1.02f, 0.1f), "GLM: Failed constexpr");
|
|
|
|
static_assert(!glm::equal(1.01f, 1.02f, 0.001f), "GLM: Failed constexpr");
|
|
|
|
|
2018-08-01 10:10:27 +00:00
|
|
|
int Error = 0;
|
|
|
|
|
|
|
|
Error += glm::equal(1.01f, 1.02f, 0.1f) ? 0 : 1;
|
|
|
|
Error += !glm::equal(1.01f, 1.02f, 0.001f) ? 0 : 1;
|
|
|
|
|
|
|
|
return Error;
|
|
|
|
}
|
|
|
|
|
|
|
|
int test_notEqual()
|
|
|
|
{
|
2018-08-07 12:46:56 +00:00
|
|
|
static_assert(glm::notEqual(1.01f, 1.02f, 0.001f), "GLM: Failed constexpr");
|
|
|
|
static_assert(!glm::notEqual(1.01f, 1.02f, 0.1f), "GLM: Failed constexpr");
|
|
|
|
|
2018-08-01 10:10:27 +00:00
|
|
|
int Error = 0;
|
|
|
|
|
|
|
|
Error += glm::notEqual(1.01f, 1.02f, 0.001f) ? 0 : 1;
|
|
|
|
Error += !glm::notEqual(1.01f, 1.02f, 0.1f) ? 0 : 1;
|
|
|
|
|
|
|
|
return Error;
|
|
|
|
}
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
int Error = 0;
|
|
|
|
|
|
|
|
Error += test_equal();
|
|
|
|
Error += test_notEqual();
|
|
|
|
|
|
|
|
return Error;
|
|
|
|
}
|