Adding constexpr for quat lerp

This commit is contained in:
RohacekD 2020-12-08 01:34:53 +01:00 committed by Dominik Roháček
parent 7eef79c9c7
commit 231c18694b
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ namespace glm
/// @tparam T A floating-point scalar type
/// @tparam Q A value from qualifier enum
template<typename T, qualifier Q>
GLM_FUNC_DECL qua<T, Q> lerp(qua<T, Q> const& x, qua<T, Q> const& y, T a);
GLM_FUNC_DECL GLM_CONSTEXPR qua<T, Q> lerp(qua<T, Q> const& x, qua<T, Q> 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.

View File

@ -26,7 +26,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER qua<T, Q> lerp(qua<T, Q> const& x, qua<T, Q> const& y, T a)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua<T, Q> lerp(qua<T, Q> const& x, qua<T, Q> const& y, T a)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'lerp' only accept floating-point inputs");