diff --git a/ChangeLog.md b/ChangeLog.md index 03a51ba76..6071937db 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -85,6 +85,7 @@ Nazara Engine: - Fixed Sound copy which was not copying looping state - Fixed Billboard bounding volume - Fixed Directory::GetResultSize and Directory::IsResultDirectory on Posix systems +- Fixed Quaternion::Inverse which was not correctly normalizing quaternions Nazara Development Kit: - Added ImageWidget (#139) diff --git a/include/Nazara/Math/Quaternion.inl b/include/Nazara/Math/Quaternion.inl index e65be083a..59099f3b8 100644 --- a/include/Nazara/Math/Quaternion.inl +++ b/include/Nazara/Math/Quaternion.inl @@ -220,7 +220,7 @@ namespace Nz T norm = SquaredMagnitude(); if (norm > F(0.0)) { - T invNorm = F(1.0) / norm; + T invNorm = F(1.0) / std::sqrt(norm); w *= invNorm; x *= -invNorm;