mirror of
https://github.com/g-truc/glm.git
synced 2024-11-29 19:34:36 +00:00
Adding constexpr to cross(vec, qua) and cross(qua, vec)
This commit is contained in:
parent
47ce4ef8a3
commit
d0806d4b6d
@ -43,7 +43,7 @@ namespace glm
|
||||
///
|
||||
/// @see gtx_quaternion
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL vec<3, T, Q> cross(
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> cross(
|
||||
qua<T, Q> const& q,
|
||||
vec<3, T, Q> const& v);
|
||||
|
||||
@ -51,7 +51,7 @@ namespace glm
|
||||
///
|
||||
/// @see gtx_quaternion
|
||||
template<typename T, qualifier Q>
|
||||
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<T, Q> const& q);
|
||||
|
||||
|
@ -12,13 +12,13 @@ namespace glm
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<3, T, Q> cross(vec<3, T, Q> const& v, qua<T, Q> const& q)
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> cross(vec<3, T, Q> const& v, qua<T, Q> const& q)
|
||||
{
|
||||
return inverse(q) * v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<3, T, Q> cross(qua<T, Q> const& q, vec<3, T, Q> const& v)
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> cross(qua<T, Q> const& q, vec<3, T, Q> const& v)
|
||||
{
|
||||
return q * v;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user