Skip to content

Signed angle 2D#76

Closed
xix-xeaon wants to merge 2 commits intotreeform:masterfrom
xix-xeaon:master
Closed

Signed angle 2D#76
xix-xeaon wants to merge 2 commits intotreeform:masterfrom
xix-xeaon:master

Conversation

@xix-xeaon
Copy link
Copy Markdown

I spent a lot of time trying to figure out why my code wasn't working, before finally identifying the angle function as the cause of the error. I thought I had the latest version but I didn't so I missed the fix in #74 and eventually solved it myself.

Sometime later I thought I should contribute my fix, only this time I discovered that the problem had already been solved. However, upon updating I realized that the function in #74 discards the sign of the angle, which is unfortunate because that information is extremely useful for a lot of things.

This version keeps the sign information (+PI to -PI), with positive values in the CCW direction as is traditional.

@treeform
Copy link
Copy Markdown
Owner

Thank you for this PR. I also realized that angle function was a problem. I think this PR fixes it in a much broader way with quaternions and comparisons to other vector libraries. 7bd9f6e

@treeform treeform closed this Apr 30, 2026
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.

2 participants