CultMath: rotation algebra (quaternion clamps, inverse, normalize) #184

Merged
eureka merged 7 commits from hands/cultmath-rotation-algebra into main 2026-11-27 21:24:27 +00:00
Owner

Quaternion rotation algebra for CultMath C#: cone, twist and hinge clamps (angle by atan2; wrapped windows clamp to the nearer bound; infinite or full-turn windows pass through; NaN in any argument propagates), and inverse and normalize scaled by the largest component (direction kept from 1e-30 to 1e30; zero gives identity).

Cut cultlib-gaps:cut_spec:cut-cultmath-rotation-algebra; reports h1-h3; Soul s1-s3 (s3 holds every fix; one Low pinning gap at the float32 noise floor recorded). QuaternionTests 28/28. Two pre-existing CultMath failures on main are filed separately (cultlib-gaps:follow_up:cultmath-main-test-failures).

🤖 Generated with Claude Code

Quaternion rotation algebra for CultMath C#: cone, twist and hinge clamps (angle by atan2; wrapped windows clamp to the nearer bound; infinite or full-turn windows pass through; NaN in any argument propagates), and inverse and normalize scaled by the largest component (direction kept from 1e-30 to 1e30; zero gives identity). Cut `cultlib-gaps:cut_spec:cut-cultmath-rotation-algebra`; reports h1-h3; Soul s1-s3 (s3 holds every fix; one Low pinning gap at the float32 noise floor recorded). QuaternionTests 28/28. Two pre-existing CultMath failures on main are filed separately (`cultlib-gaps:follow_up:cultmath-main-test-failures`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
mul(float4, float4) would otherwise bind to a quaternion product once mul(quaternion, quaternion) lands.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Hamilton, xyzw, radians, mul(a, b) applies b first, q == mul(swing, twist). Semantics from cultlib-gaps-map section Q; written from definitions, not Unity.Mathematics.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
CultMath: clamp_twist's NaN guard is one post-wrap check
All checks were successful
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Successful in 28m39s
e2afa3f31b
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
eureka merged commit be036b1fda into main 2026-11-27 21:24:27 +00:00
eureka deleted branch hands/cultmath-rotation-algebra 2026-11-27 21:24:27 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/CultLib!184
No description provided.