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

Fix: Update sin(), cos(), and tan() docs to respect angleMode() & cl… #7593

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

VANSH3104
Copy link

Resolves #7562
This PR updates the documentation for trigonometric functions (sin(), cos(), tan()) and the arc() function to correctly reflect their behavior with angleMode().
Changes:

Changes Made:
✅ Updated sin(), cos(), and tan() docs to specify that they respect angleMode(DEGREES).
✅ Clarified that arc() uses both radians and degrees depending on angleMode().
✅ Ensured consistency in documentation for trigonometric functions.

Screenshots of the change:

PR Checklist

@worthant
Copy link

worthant commented Mar 6, 2025

Nice job 👍

@ksen0
Copy link
Member

ksen0 commented Mar 25, 2025

Hi @VANSH3104, thanks for putting this together.

Just one small bit of feedback in terms of phrasing:

  • Currently: "in radians by default or degrees if angleMode(DEGREES) is set."
  • Suggested: "in radians by default, or according to angleMode() setting (RADIANS or DEGREES)"

In the original issue, @davepagurek also mentions:

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 dev-2.0 branch. We'd like to fix this forward for 2.0, but also it would be good to keep the 1.x docs up to date too. So potentially we could have two PRs, one for each branch?

Could you please (1) update this PR with the phrasing suggestion and also (2) make an additional PR please for the dev-2.0 branch as well? Thank you!

@VANSH3104
Copy link
Author

@ksen0 sure i will do it

@VANSH3104 VANSH3104 force-pushed the VANSH3104/anglemode branch from 391af66 to 537e860 Compare March 25, 2025 08:31
@VANSH3104
Copy link
Author

@ksen0 I have done everything you told me and also improved the commit history.

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

Successfully merging this pull request may close these issues.

arc() function docs say it only uses radians, but it actually listens to angleMode()
3 participants