diff options
author | shaderbeast <jd16581556@gmail.com> | 2019-05-06 11:01:31 +0200 |
---|---|---|
committer | shaderbeast <jd16581556@gmail.com> | 2019-05-06 11:01:31 +0200 |
commit | 041b97e5b29f62c3176e0d1179ddaf8c91489fd4 (patch) | |
tree | c00b55160a396dfdf55f3c0aa492f25469ecb262 /src/core/Quat.cpp | |
parent | 04548011e38a74fda5640ba7ec02ff74caae43f8 (diff) | |
download | redot-cpp-041b97e5b29f62c3176e0d1179ddaf8c91489fd4.tar.gz |
Fixed wrong implementation of Quat multiplication
Obeyed Clang format rules
Diffstat (limited to 'src/core/Quat.cpp')
-rw-r--r-- | src/core/Quat.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/Quat.cpp b/src/core/Quat.cpp index abfe056..d9ca0ff 100644 --- a/src/core/Quat.cpp +++ b/src/core/Quat.cpp @@ -247,10 +247,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) { |