Skip to content

Fix remaining 3 test failures: Quaternion transpose and VariableDatum padding - #43

Merged
ricklentz merged 1 commit into
masterfrom
fix/remaining-test-failures
Oct 7, 2026
Merged

ricklentz merged 1 commit into
masterfrom
fix/remaining-test-failures

Conversation

@ricklentz

Copy link
Copy Markdown
Collaborator

Summary

Fixes the 3 remaining test failures Don reported after the initial round of fixes.

Quaternion.setMat3 transpose bug (2 failures):

  • setMat3() used Chrenshaw's formula which expects a transposed matrix (the comment even says "he transposes m!") but never transposed the input
  • Result: Matrix→Quaternion→Matrix round-trip produced the transpose of the original
  • Fix: swap the anti-symmetric matrix element pairs in the extraction formulas to match getMat3's convention (Vince pg 202)
  • Verified locally: both testMatrix3fRoundTrip and testMatrix4fRoundTrip now pass

VariableDatum padding (1 failure):

  • The fix from PR Fix VariableDatum getMarshalledSize() padding calculation #40 was overwritten by Don's "full rebuild" commit which regenerated the file from the (still-unfixed) source generator template
  • Re-applied: compute padding from accumulated size instead of using padding.length (which is 0 before marshaling)
  • Companion PR on source-generator to prevent future overwrites

Closes #34, closes #36

Test plan

  • Verify all 366 tests pass (0 failures)

…m padding fix

Quaternion.setMat3 used Chrenshaw's transposed matrix convention but
the code never transposed the input, producing transposed output from
getMat3 round-trips. Swap the anti-symmetric matrix element pairs to
match getMat3's convention (Vince pg 202).

Re-apply VariableDatum.getMarshalledSize() padding fix that was
overwritten by a full rebuild from the source generator.

Closes #34, closes #36
@ricklentz
ricklentz merged commit 914ae64 into master Oct 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Java unit test problems with VariableDatumTest and VariableDatum Java unit test problems with QuaternionTest

1 participant