Fix Quaternion::mul_self_q

Fixes #224

I haven't really thought about whether there is a faster way to do this, but at least it is fixed.
This commit is contained in:
Brendan Zabarauskas 2015-09-29 18:36:41 +10:00
parent 5dd8bc7ef3
commit 494f2b65ad

View file

@ -138,8 +138,7 @@ impl<S: BaseFloat> Quaternion<S> {
/// Multiply this quaternion by another, in-place.
#[inline]
pub fn mul_self_q(&mut self, q: &Quaternion<S>) {
self.s = self.s * q.s;
self.v.mul_self_v(&q.v);
*self = self.mul_q(q);
}
/// The dot product of the quaternion and `q`.