From 24c8104189b4af02198f11c44ae9cfb41a48fceb Mon Sep 17 00:00:00 2001 From: 0_stamina Date: Sun, 5 Apr 2026 17:30:36 -0700 Subject: [PATCH] update raymath.h function QuaternionMultiply the multiplication algorithm was slightly off previously when combining quaternion rotations objects would shrink now they rotate as expected trying to get around the issue by using QuaternionToMatrix then QuaternionTransform doesn't work, and I'm not sure why --- src/raymath.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/raymath.h b/src/raymath.h index 8a0cce1a5..17ed4dab5 100644 --- a/src/raymath.h +++ b/src/raymath.h @@ -2225,9 +2225,9 @@ RMAPI Quaternion QuaternionMultiply(Quaternion q1, Quaternion q2) float qax = q1.x, qay = q1.y, qaz = q1.z, qaw = q1.w; float qbx = q2.x, qby = q2.y, qbz = q2.z, qbw = q2.w; - result.x = qax*qbw + qaw*qbx + qay*qbz - qaz*qby; - result.y = qay*qbw + qaw*qby + qaz*qbx - qax*qbz; - result.z = qaz*qbw + qaw*qbz + qax*qby - qay*qbx; + result.x = qax*qbw + qaw*qbx + qaz*qby - qay*qbz; + result.y = qay*qbw + qaw*qby + qax*qbz - qaz*qbx; + result.z = qaz*qbw + qaw*qbz + qay*qbx - qax*qby; result.w = qaw*qbw - qax*qbx - qay*qby - qaz*qbz; return result;