Skip to content

Commit

Permalink
Fix for issue 4454, MatrixDecompose() gave incorrect output for certa…
Browse files Browse the repository at this point in the history
…in combinations of scale and rotation (#4461)
  • Loading branch information
waveydave authored Nov 3, 2024
1 parent 6028052 commit 66a4f2e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/raymath.h
Original file line number Diff line number Diff line change
Expand Up @@ -2569,7 +2569,13 @@ RMAPI void MatrixDecompose(Matrix mat, Vector3 *translation, Quaternion *rotatio
if (!FloatEquals(det, 0))
{
clone.m0 /= s.x;
clone.m4 /= s.x;
clone.m8 /= s.x;
clone.m1 /= s.y;
clone.m5 /= s.y;
clone.m9 /= s.y;
clone.m2 /= s.z;
clone.m6 /= s.z;
clone.m10 /= s.z;

// Extract rotation
Expand Down

0 comments on commit 66a4f2e

Please sign in to comment.