math.h says the Mat4_* block holds "shortened names forwarding to Mat44". For this pair that is false, and the two do opposite things:
Mat44_InverseRotationTranslation(result, quat, translation)
-> Mat44::sInverseRotationTranslation(...) BUILDS a matrix from a rotation and a translation
Mat4_InverseRotationTranslation(mat)
-> toJphMat44(mat).InversedRotationTranslation() INVERTS the matrix it is given
There is a third, one letter away: RMat44_InversedRotationTranslation(m, result) — Inversed, not Inverse — which means the inverting one.
This is the likeliest thing in the wrapper to be silently mis-wired during a hand repair: three near-identical names, two semantics, and a header comment asserting they are aliases.
Worth either renaming so the difference is visible, or correcting the comment to say which is which. JoltC/tests/test_math_roundtrip.c exercises all three and asserts they agree where they should, so a rename has a safety net.
Two smaller items in the same file:
Vec3_Normalize and Vec3_Normalized are byte-identical implementations (math.cpp:72-75 and 102-105), neither in place. The name difference implies a semantic one that does not exist, so a repair could "fix" one and diverge them.
MassProperties_DecomposePrincipalMomentsOfInertia discards Jolt's convergence bool and, on the exception path, never writes its out-parameters — a caller who did not pre-zero them reads uninitialised memory with no way to tell.
math.hsays theMat4_*block holds "shortened names forwarding to Mat44". For this pair that is false, and the two do opposite things:There is a third, one letter away:
RMat44_InversedRotationTranslation(m, result)—Inversed, notInverse— which means the inverting one.This is the likeliest thing in the wrapper to be silently mis-wired during a hand repair: three near-identical names, two semantics, and a header comment asserting they are aliases.
Worth either renaming so the difference is visible, or correcting the comment to say which is which.
JoltC/tests/test_math_roundtrip.cexercises all three and asserts they agree where they should, so a rename has a safety net.Two smaller items in the same file:
Vec3_NormalizeandVec3_Normalizedare byte-identical implementations (math.cpp:72-75and102-105), neither in place. The name difference implies a semantic one that does not exist, so a repair could "fix" one and diverge them.MassProperties_DecomposePrincipalMomentsOfInertiadiscards Jolt's convergencebooland, on the exception path, never writes its out-parameters — a caller who did not pre-zero them reads uninitialised memory with no way to tell.