Repository navigation
Touch tolerance in the collision contract; float32 DetMathF - #3
Merged
Merged
Conversation
SPEC section 4: shapes that start within the lib's touch tolerance count as touching and block only a move into them (dot(move, normal) < 0). Template: TPL_TOUCH_TOLERANCE / CollisionRules.TouchTolerance, a box sweep in the test world that follows the rule, CollisionTests (slide along floor and wall, blocked moving in, deep overlap, first contact). COMPLIANCE rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011dFkrWqBVAw1kojJ7PN58H
Same functions as DetMath (Sin, Cos, Atan, Atan2, Sqrt), computed in float only, for float32 sims (TPL_SIM_BITS = 32). Tests: closeness to Math and golden bits, run on Linux, Windows and macOS arm64 in CI. SPEC mentions it; CLAUDE.md Next item done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011dFkrWqBVAw1kojJ7PN58H
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits.
1. Touch tolerance
<P>_TOUCH_TOLERANCE. A shape that starts within the tolerance (just apart, or overlapping by less) is touching. It blocks only when the move goes into the surface (dot(move, normal) < 0), with a hit at t 0. A deeper start overlap is a real hit. Otherwise the first contact along the move is the hit.TPL_TOUCH_TOLERANCE/CollisionRules.TouchTolerance(0.5 cm, checked by HeaderTests). The test world gets a box sweep (TestWorld.SweepBox) that follows the rule. NewCollisionTests:ICollisionWorlduses the literal start-overlap rule, so it is ❌; libfc is unknown.2. Float32 DetMathF (CLAUDE.md Next item 4)
TEMPLATE/src/Tpl.Core/DetMathF.cs: the same functions asDetMath(Sin, Cos, Atan, Atan2, Sqrt), computed in float only.Math, plus golden bits that must match on Linux, Windows and macOS arm64 in CI.Local:
dotnet test71/71.🤖 Generated with Claude Code
https://claude.ai/code/session_011dFkrWqBVAw1kojJ7PN58H