2018-08-01 10:10:27 +00:00
|
|
|
#include <glm/ext/scalar_relational.hpp>
|
|
|
|
|
|
|
|
int test_equal()
|
|
|
|
{
|
2018-08-07 18:44:44 +00:00
|
|
|
# if GLM_CONFIG_CONSTEXP == GLM_ENABLE
|
|
|
|
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");
|
|
|
|
# endif
|
|
|
|
|
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 18:44:44 +00:00
|
|
|
# if GLM_CONFIG_CONSTEXP == GLM_ENABLE
|
|
|
|
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");
|
|
|
|
# endif
|
|
|
|
|
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;
|
|
|
|
}
|