From 494f2b65ad023d454f9011e472d2ea9a8e147e81 Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Tue, 29 Sep 2015 18:36:41 +1000 Subject: [PATCH] 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. --- src/quaternion.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/quaternion.rs b/src/quaternion.rs index 3c241e6..76c59ca 100644 --- a/src/quaternion.rs +++ b/src/quaternion.rs @@ -138,8 +138,7 @@ impl Quaternion { /// Multiply this quaternion by another, in-place. #[inline] pub fn mul_self_q(&mut self, q: &Quaternion) { - 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`.