Skip to content

fix: normalise raw rotation angle to [-180, 180) - #2276

Open
WudgeJalk wants to merge 1 commit into
fleaflet:masterfrom
WudgeJalk:fix/normalise-rotation
Open

WudgeJalk wants to merge 1 commit into
fleaflet:masterfrom
WudgeJalk:fix/normalise-rotation

Conversation

@WudgeJalk

Copy link
Copy Markdown

Fixes #2275.

ScaleUpdateDetails.rotation is atan2(now) - atan2(start), not normalised. Two fingers side by side rotated by 4° report -356°, which wins the multi-finger gesture race as a rotation.

Normalised to [-180°, 180°) where it is read. No behaviour change below ±180°.

Test: test/gestures/rotation_normalisation_test.dart — on master camera.rotation ends at -356° for a 4° gesture, 0 with the fix. Full suite passes (141).

🤖 Generated with Claude Code

`ScaleUpdateDetails.rotation` is `atan2(now) - atan2(start)`, not
normalised: two fingers side by side rotated by 4° report -356°, which
wins the multi-finger gesture race as a rotation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

Raw ScaleUpdateDetails.rotation isn't normalised: a 4° rotation can report -356° and win the multi-finger gesture race

1 participant