-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
arc() function docs say it only uses radians, but it actually listens to angleMode() #7562
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you! |
It looks like maybe this is actually using radians, but 45 radians wraps around enough times that it looks similar to a 45 degree angle. To test this, I manually am drawing a line along In the code, it looks like we are using p5.js/src/core/shape/2d_primitives.js Lines 327 to 328 in 3c9de13
|
@davepagurek Hi!) Thanks for your answer, that was rapid fast 👍 Thanks for pointing that out, that's actually my skill issue, because i implemented my own I indeed think that it's necessary to mention this in the docs, as it's a bit confusing :) To clarify, 45 radians = 2578.31 grad |
So, can i/ should i change p5.js docs now? Should i change them only for arc, or also for other functions, as i suppose this could be the thing for some other math functions? |
That would be great! So to complicate things a little bit: we currently are close to a release for p5 2.0, and development for that is in the For other functions: if you notice other cases, that would also be great to fix! Ideally in most cases it supports both radians and degrees based on the mode, but if some existing docs specify just radians, we should do a quick check to see if it does actually support both before we assume it does, and hold off updating those docs for now if it really does only support radians. (And maybe file a separate issue to make it correctly handle angleMode for consistency 🙂) |
I just updated the issue title for clarity! |
@davepagurek Ok let's go like this: I'll create fixes in a PR for a dev-2.0 branch, and only when it will be approved i will just cherry-pick all the commits to the similar PR for the 1.x branch, because other way we could potentially have 1 million change requests and discussions in both of them (just looking in the future), which wouldn't be good for clarity. How fast do you want it to be done? I'm working+studying currently, so is 1-3 days of delay acceptable? |
Sounds good! As a heads up, I'm not certain how well cherry picking will work because we've moved some things around in the codebase, so there may be some manual merge conflicts to resolve after cherry picking -- let me know when you get there if you need any help with that.
For sure! 2.0 won't get released until end of March anyway haha |
Most appropriate sub-area of p5.js?
p5.js version
1.11.3
Web browser and version
all of them
Operating system
Linux Fedora Workstation 39 && Windows 11
Steps to reproduce this
Steps:
Snippet:
here is what you get from this code:
The text was updated successfully, but these errors were encountered: