You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the description for those functions, its noted that the function 'takes into account the current angleMode()'. They don't state the default expectation that it's radians. The reference for angleMode() does: 'Functions such as rotate() and sin() expect angles measured radians by default.'
It's okay as it is, but would it be clearer for each of the trig functions' parameters that say 'angle: the angle' to clarify that by default its expecting a radian value, without new users needing to check the default state of angleMode()?
Maybe something like:
angle the angle, in radians unless specified by angleMode().
I would be happy to work on this if it's an issue worth fixing.
The text was updated successfully, but these errors were encountered:
Hi, can I clarify something @limzykenneth ? I've made the changes to the p5.js source code in src/math/trigonometry.js following the contributer docs, but I've just realised this issue is in the p5.js-website repo, not the main p5.js source repository. In my pull request, I'm not sure if I can 'resolve' an issue that's technically from another repo?
Should I have made this issue over in the p5-js repo to start with?
Sorry, this is my first contribution. I'm learning but trying to be careful.
@thrly No that is correct, changes to the reference content should be made in the inline reference in the p5.js source code repository. The version in the website repo is updated automatically from that.
Topic
Currently the parameter details for trig functions like sin(), cos(), asin() etc., say:
* @param {Number} angle the angle.
In the description for those functions, its noted that the function 'takes into account the current
angleMode()
'. They don't state the default expectation that it's radians. The reference forangleMode()
does: 'Functions such as rotate() and sin() expect angles measured radians by default.'It's okay as it is, but would it be clearer for each of the trig functions' parameters that say 'angle: the angle' to clarify that by default its expecting a radian value, without new users needing to check the default state of angleMode()?
Maybe something like:
I would be happy to work on this if it's an issue worth fixing.
The text was updated successfully, but these errors were encountered: