Added constexpr relational operators

This commit is contained in:
Christophe Riccio
2018-08-06 19:28:42 +02:00
parent f82d23949a
commit 389fb2457d
12 changed files with 121 additions and 64 deletions

View File

@@ -301,8 +301,10 @@ int test_size()
{
int Error = 0;
Error += 16 == sizeof(glm::quat) ? 0 : 1;
Error += 32 == sizeof(glm::dquat) ? 0 : 1;
std::size_t const A = sizeof(glm::quat);
Error += 16 == A ? 0 : 1;
std::size_t const B = sizeof(glm::dquat);
Error += 32 == B ? 0 : 1;
Error += glm::quat().length() == 4 ? 0 : 1;
Error += glm::dquat().length() == 4 ? 0 : 1;
Error += glm::quat::length() == 4 ? 0 : 1;

View File

@@ -2,7 +2,9 @@
#if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
#include <glm/gtc/type_aligned.hpp>
#include <glm/gtc/type_precision.hpp>
#include <glm/ext/vector_relational.hpp>
#include <glm/ext/matrix_relational.hpp>
GLM_STATIC_ASSERT(glm::detail::is_aligned<glm::aligned_lowp>::value, "aligned_lowp is not aligned");
GLM_STATIC_ASSERT(glm::detail::is_aligned<glm::aligned_mediump>::value, "aligned_mediump is not aligned");