summaryrefslogtreecommitdiffstats
path: root/src/core/Quat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Quat.cpp')
-rw-r--r--src/core/Quat.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/Quat.cpp b/src/core/Quat.cpp
index 7837e41..00fa43d 100644
--- a/src/core/Quat.cpp
+++ b/src/core/Quat.cpp
@@ -266,10 +266,10 @@ void Quat::operator-=(const Quat &q) {
}
void Quat::operator*=(const Quat &q) {
- x *= q.x;
- y *= q.y;
- z *= q.z;
- w *= q.w;
+ set(w * q.x + x * q.w + y * q.z - z * q.y,
+ w * q.y + y * q.w + z * q.x - x * q.z,
+ w * q.z + z * q.w + x * q.y - y * q.x,
+ w * q.w - x * q.x - y * q.y - z * q.z);
}
void Quat::operator*=(const real_t &s) {