From afae3b57fca0e39bc2a8dee09edfbb52f13510ef Mon Sep 17 00:00:00 2001 From: John Turner <7strbass@gmail.com> Date: Fri, 26 Jan 2024 12:14:44 -0500 Subject: [PATCH] --fix an error - shouldn't normalize the cross product. --- src/esp/core/Utility.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/esp/core/Utility.h b/src/esp/core/Utility.h index 64fa599eb2..a18d6df2e5 100644 --- a/src/esp/core/Utility.h +++ b/src/esp/core/Utility.h @@ -63,9 +63,8 @@ Magnum::Math::Quaternion quatRotFromTwoVectors( return Magnum::Math::Quaternion(rotAxisVec, 0).normalized(); } const auto halfVec = (fromNorm + toNorm).normalized(); - return Magnum::Math::Quaternion( - Magnum::Math::cross(fromNorm, halfVec).normalized(), - Magnum::Math::dot(fromNorm, halfVec)) + return Magnum::Math::Quaternion(Magnum::Math::cross(fromNorm, halfVec), + Magnum::Math::dot(fromNorm, halfVec)) .normalized(); } // quatRotFromTwoVectors