quaternion: add matrix multiply convenience method

This commit is contained in:
Danny Robson 2018-04-18 21:44:56 +10:00
parent eb2b85c4f6
commit 999ec1c35c

View File

@ -152,6 +152,24 @@ namespace util {
}
///////////////////////////////////////////////////////////////////////////
template <typename T>
matrix<4,4,T>
operator* (quaternion<T> q, matrix<4,4,T> m)
{
return q.as_matrix () * m;
}
//-------------------------------------------------------------------------
template <typename T>
matrix<4,4,T>
operator* (matrix<4,4,T> m, quaternion<T> q)
{
return m * q.as_matrix ();
}
///////////////////////////////////////////////////////////////////////////
template <typename T>
constexpr