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
This commit is contained in:
0_stamina 2026-04-05 17:30:36 -07:00 committed by GitHub
parent c5fc771622
commit 24c8104189
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;