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

Clarifying default parameter angle mode for trig functions like sin() and cos() #671

Open
thrly opened this issue Jan 4, 2025 · 0 comments

Comments

@thrly
Copy link

thrly commented Jan 4, 2025

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 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.

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

No branches or pull requests

1 participant