quaternion: add assignment-multiply operator
This commit is contained in:
parent
e549f3d554
commit
3a4b711467
@ -127,6 +127,15 @@ util::operator* (const quaternion<T> a, const quaternion<T> b)
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <typename T>
|
||||
quaternion<T>&
|
||||
util::operator*= (quaternion<T> &a, const quaternion<T> b)
|
||||
{
|
||||
return a = a * b;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <typename T>
|
||||
quaternion<T>
|
||||
@ -254,6 +263,7 @@ namespace util::debug {
|
||||
template util::vector3<T> util::rotate (util::vector3<T>, util::quaternion<T>); \
|
||||
template quaternion<T> util::conjugate (quaternion<T>); \
|
||||
template quaternion<T> util::operator* (quaternion<T>, quaternion<T>); \
|
||||
template quaternion<T>& util::operator*= (quaternion<T>&, quaternion<T>); \
|
||||
template quaternion<T> util::operator/ (quaternion<T>, quaternion<T>); \
|
||||
template bool util::almost_equal (util::quaternion<T>, util::quaternion<T>); \
|
||||
template std::ostream& util::operator<< (std::ostream&, quaternion<T>); \
|
||||
|
@ -89,6 +89,11 @@ namespace util {
|
||||
quaternion<T>
|
||||
operator* (quaternion<T>, quaternion<T>);
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
template <typename T>
|
||||
quaternion<T>&
|
||||
operator*= (quaternion<T>&, quaternion<T>);
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
template <typename T>
|
||||
quaternion<T>
|
||||
|
Loading…
Reference in New Issue
Block a user