From 225f178a6aa154f2749006223210d3a6bfb1e746 Mon Sep 17 00:00:00 2001 From: RohacekD Date: Tue, 8 Dec 2020 01:51:22 +0100 Subject: [PATCH] Adding constexpr to quaternion comparison functions lessThan, lessThanEqual, greaterThan, greaterThanEqual --- glm/gtc/quaternion.hpp | 8 ++++---- glm/gtc/quaternion.inl | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 359e072b..314449eb 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -112,7 +112,7 @@ namespace glm /// /// @see ext_quaternion_relational template - GLM_FUNC_DECL vec<4, bool, Q> lessThan(qua const& x, qua const& y); + GLM_FUNC_DECL GLM_CONSTEXPR vec<4, bool, Q> lessThan(qua const& x, qua const& y); /// Returns the component-wise comparison of result x <= y. /// @@ -121,7 +121,7 @@ namespace glm /// /// @see ext_quaternion_relational template - GLM_FUNC_DECL vec<4, bool, Q> lessThanEqual(qua const& x, qua const& y); + GLM_FUNC_DECL GLM_CONSTEXPR vec<4, bool, Q> lessThanEqual(qua const& x, qua const& y); /// Returns the component-wise comparison of result x > y. /// @@ -130,7 +130,7 @@ namespace glm /// /// @see ext_quaternion_relational template - GLM_FUNC_DECL vec<4, bool, Q> greaterThan(qua const& x, qua const& y); + GLM_FUNC_DECL GLM_CONSTEXPR vec<4, bool, Q> greaterThan(qua const& x, qua const& y); /// Returns the component-wise comparison of result x >= y. /// @@ -139,7 +139,7 @@ namespace glm /// /// @see ext_quaternion_relational template - GLM_FUNC_DECL vec<4, bool, Q> greaterThanEqual(qua const& x, qua const& y); + GLM_FUNC_DECL GLM_CONSTEXPR vec<4, bool, Q> greaterThanEqual(qua const& x, qua const& y); /// Build a look at quaternion based on the default handedness. /// diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index e1ef0321..5f328816 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -129,7 +129,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec<4, bool, Q> lessThan(qua const& x, qua const& y) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, bool, Q> lessThan(qua const& x, qua const& y) { vec<4, bool, Q> Result; for(length_t i = 0; i < x.length(); ++i) @@ -138,7 +138,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec<4, bool, Q> lessThanEqual(qua const& x, qua const& y) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, bool, Q> lessThanEqual(qua const& x, qua const& y) { vec<4, bool, Q> Result; for(length_t i = 0; i < x.length(); ++i) @@ -147,7 +147,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec<4, bool, Q> greaterThan(qua const& x, qua const& y) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, bool, Q> greaterThan(qua const& x, qua const& y) { vec<4, bool, Q> Result; for(length_t i = 0; i < x.length(); ++i) @@ -156,7 +156,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec<4, bool, Q> greaterThanEqual(qua const& x, qua const& y) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, bool, Q> greaterThanEqual(qua const& x, qua const& y) { vec<4, bool, Q> Result; for(length_t i = 0; i < x.length(); ++i)