Skip to content

Fixed turf-angle to consistently measure angles clockwise#2714

Merged
smallsaucepan merged 1 commit intoTurfjs:masterfrom
smallsaucepan:angle-fix
Sep 17, 2024
Merged

Fixed turf-angle to consistently measure angles clockwise#2714
smallsaucepan merged 1 commit intoTurfjs:masterfrom
smallsaucepan:angle-fix

Conversation

@smallsaucepan
Copy link
Copy Markdown
Member

Additionally, reviewed the implementations of azimuthToBearing, radiansToDegrees, and degreesToRadians to be easier to follow. Small discrepancies in the angle() geojson test fixtures caused by the bearing be taken from the wrong end of each line needed to be fixed. These tests included additional illustrative info meaning they were overly fragile though, so retired those in favour of vanilla unit tests which should be sufficient for a simple function like angle.

Resolves #2703.

… docs. Reviewed the implementations of azimuthToBearing, radiansToDegrees, and degreesToRadians to be easier to follow. Small discrepancies in the angle() geojson test fixtures caused by the bearing be taken from the wrong end of each line needed to be fixed. These tests included additional illustrative info meaning they were overly fragile though, so retired those in favour of vanilla unit tests which should be sufficient for a simple function like angle.
@smallsaucepan smallsaucepan self-assigned this Sep 15, 2024
Copy link
Copy Markdown
Collaborator

@mfedderly mfedderly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@smallsaucepan
Copy link
Copy Markdown
Member Author

Thanks for reviewing @mfedderly

@smallsaucepan smallsaucepan merged commit 2907628 into Turfjs:master Sep 17, 2024
@smallsaucepan smallsaucepan deleted the angle-fix branch September 22, 2024 05:42
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.

turf.angle does not return signed angle as claimed

2 participants