-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
p5.Vector.setHeading uses radians, even when angleMode(DEGREES) is specified #5497
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
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already. |
|
Fixing this would probably count as a breaking change so I'm not 100% sure if we want to fix this as this stage. Alternatively on the vector and angle related functions documentation we can add a note about this and suggestion to use |
Please add this to the docs 🙏 . I just got tripped up by this for a few hours until I read the source and realised it only took radians as input. |
I'm having a reverse on opinion here and think all angle related methods under p5.Vector probably should be respecting |
Functions in p5.Vector taking angleMode() into consideration: should we make |
@jeffawang, @AdilRabbani, I would also like to know your opinion. |
@KevinGrajeda You can file PRs to apply angle mode to those functions. |
Thanks for finding other instances that need to change. I agree witih @limzykenneth's conclusion that it's a breaking change but that it's worth fixing for consistency. |
hey @limzykenneth i think #5495 closed this by mistake. |
Most appropriate sub-area of p5.js?
Details about the bug:
Logs
Expected: 1, Received: 57.29577951308232
to the console, butLogs
Expected: 1, Received: 1
to the consoleThe text was updated successfully, but these errors were encountered: