diff options
author | Thomas Herzog <therzog@mail.de> | 2019-06-04 08:01:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-04 08:01:12 +0200 |
commit | 5bdcecfc20675ad3bec8ab63df94cf445f0fe54d (patch) | |
tree | 46380087883c44fae935a6eb2fd30400c804a964 | |
parent | 02200452687d6b3cdef9b54e57e824e0b01386c8 (diff) | |
parent | 041b97e5b29f62c3176e0d1179ddaf8c91489fd4 (diff) | |
download | redot-cpp-5bdcecfc20675ad3bec8ab63df94cf445f0fe54d.tar.gz |
Merge pull request #289 from 2shady4u/master
Fixed wrong implementation of Quat multiplication
-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) { |