Adding constexpr for conjugate

This commit is contained in:
RohacekD 2020-12-08 01:19:39 +01:00 committed by Dominik Roháček
parent d21c0b06ea
commit a73987d863
2 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ namespace glm
/// @tparam T A floating-point scalar type /// @tparam T A floating-point scalar type
/// @tparam Q A value from qualifier enum /// @tparam Q A value from qualifier enum
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL qua<T, Q> conjugate(qua<T, Q> const& q); GLM_FUNC_DECL GLM_CONSTEXPR qua<T, Q> conjugate(qua<T, Q> const& q);
/// Returns the q inverse. /// Returns the q inverse.
/// ///

View File

@ -110,7 +110,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER qua<T, Q> conjugate(qua<T, Q> const& q) GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua<T, Q> conjugate(qua<T, Q> const& q)
{ {
return qua<T, Q>(q.w, -q.x, -q.y, -q.z); return qua<T, Q>(q.w, -q.x, -q.y, -q.z);
} }