From 041b97e5b29f62c3176e0d1179ddaf8c91489fd4 Mon Sep 17 00:00:00 2001 From: shaderbeast Date: Mon, 6 May 2019 11:01:31 +0200 Subject: [PATCH] Fixed wrong implementation of Quat multiplication Obeyed Clang format rules --- src/core/Quat.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/Quat.cpp b/src/core/Quat.cpp index abfe0568..d9ca0ffa 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) {