Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direction of rotation in transformRotate? #2015

Closed
pasieronen opened this issue Jan 20, 2021 · 1 comment · Fixed by #2016
Closed

Direction of rotation in transformRotate? #2015

pasieronen opened this issue Jan 20, 2021 · 1 comment · Fixed by #2016

Comments

@pasieronen
Copy link
Contributor

The documentation for transformRotate says angle: of rotation (along the vertical axis), from North in decimal degrees, negative clockwise and all rotations follow the right-hand rule (which here means positive = counterclockwise, right?).

But the example in http://turfjs.org/docs/#transformRotate shows that a positive angle (10 degrees in the example) rotates the triangle clockwise.

(And this would be consistent with the "bearing" parameter for some other Turf.js functions, which explicitly say positive clockwise).

Which is the intended behavior here?

(btw, turf/ellipse has the same description for its "angle" parameter, and it uses transformRotate internally).

@stebogit
Copy link
Collaborator

yeah, that's definitely an error on the docs: the example is correct, positive rotation is clockwise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants