From 231c18694b6c48fafe45da756aeb705e33bff462 Mon Sep 17 00:00:00 2001 From: RohacekD Date: Tue, 8 Dec 2020 01:34:53 +0100 Subject: [PATCH] Adding constexpr for quat lerp --- glm/ext/quaternion_common.hpp | 2 +- glm/ext/quaternion_common.inl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/glm/ext/quaternion_common.hpp b/glm/ext/quaternion_common.hpp index a2a43463..f738692a 100644 --- a/glm/ext/quaternion_common.hpp +++ b/glm/ext/quaternion_common.hpp @@ -62,7 +62,7 @@ namespace glm /// @tparam T A floating-point scalar type /// @tparam Q A value from qualifier enum template - GLM_FUNC_DECL qua lerp(qua const& x, qua const& y, T a); + GLM_FUNC_DECL GLM_CONSTEXPR qua lerp(qua const& x, qua const& y, T a); /// Spherical linear interpolation of two quaternions. /// The interpolation always take the short path and the rotation is performed at constant speed. diff --git a/glm/ext/quaternion_common.inl b/glm/ext/quaternion_common.inl index 4b4d0f80..d19df8b4 100644 --- a/glm/ext/quaternion_common.inl +++ b/glm/ext/quaternion_common.inl @@ -26,7 +26,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER qua lerp(qua const& x, qua const& y, T a) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua lerp(qua const& x, qua const& y, T a) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'lerp' only accept floating-point inputs");