From d0806d4b6dda236d31be882b47dd88d18abf0d91 Mon Sep 17 00:00:00 2001 From: RohacekD Date: Tue, 8 Dec 2020 23:19:33 +0100 Subject: [PATCH] Adding constexpr to cross(vec, qua) and cross(qua, vec) --- glm/gtx/quaternion.hpp | 4 ++-- glm/gtx/quaternion.inl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/glm/gtx/quaternion.hpp b/glm/gtx/quaternion.hpp index 5c2b5ad0..319f320c 100644 --- a/glm/gtx/quaternion.hpp +++ b/glm/gtx/quaternion.hpp @@ -43,7 +43,7 @@ namespace glm /// /// @see gtx_quaternion template - GLM_FUNC_DECL vec<3, T, Q> cross( + GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> cross( qua const& q, vec<3, T, Q> const& v); @@ -51,7 +51,7 @@ namespace glm /// /// @see gtx_quaternion template - GLM_FUNC_DECL vec<3, T, Q> cross( + GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> cross( vec<3, T, Q> const& v, qua const& q); diff --git a/glm/gtx/quaternion.inl b/glm/gtx/quaternion.inl index d125bccc..eea38a02 100644 --- a/glm/gtx/quaternion.inl +++ b/glm/gtx/quaternion.inl @@ -12,13 +12,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec<3, T, Q> cross(vec<3, T, Q> const& v, qua const& q) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> cross(vec<3, T, Q> const& v, qua const& q) { return inverse(q) * v; } template - GLM_FUNC_QUALIFIER vec<3, T, Q> cross(qua const& q, vec<3, T, Q> const& v) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> cross(qua const& q, vec<3, T, Q> const& v) { return q * v; }