Open EshaanAgg opened 1 year ago
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!
I would love to work on this issue.
Please assign this issue to me.
The question is, if this is something p5.js should do, or rather another library such as Angles.js with its method normalizeHalf(x)
: https://www.npmjs.com/package/angles
Thank you @EshaanAgg for opening this issue. I am inviting more Math stewards to this discussion @limzykenneth, @jeffawang, @AdilRabbani. Would love to hear what y'all think.
I can understand the straightforward appeal of implementing this but wouldn't it be sufficient to offset the angle values used in your sketch by +180 degrees or +PI before passing them to p5.js functions?
The main thing for me here is the utility aspect of this feature as well as how this feature increases access. I would recommend fleshing out the feature more in this issue first before thinking about the PR or actual code implementation.
Thank you all for working on this issue. I am inviting the current Math stewards to this discussion @limzykenneth, @ericnlchen, @ChihYungChang, @bsubbaraman, @albertomancia, @JazerUCSB, @tedkmburu, @perminder-17, @Obi-Engine10, @jeanetteandrews. Would love to hear what y'all think.
@Qianqianye @davepagurek I think we should directly make a global function which we will be use in different trigonometric functions and that will directly check whether the given angle have radian value or principle value, that function directly change the radian to principle value.
@Qianqianye @limzykenneth Is it still a relevant feature or should we skip this for a while ?
For now my comment above still applies and this feature will still need a stronger case for inclusion before we can consider it.
There are lots of function that takes both and works perfectly fine like we have the rotateZ function which takes both degree and radian angles.So do we really need this feature?
Increasing Access
While using angles in mathematical and geometric constructions, we often want the angle to be in the principal range i.e. from -180 to 180 degrees (or -PI to PI in radians). We can implement one such utility method.
Most appropriate sub-area of p5.js?
Feature request details
The method can be added with documentation in the
src/math/trignometry.js
file so that he conversion takes place after detecting the current angle mode.Can also be complemented with another boolean function
isPrincipalArgument()
to check the same.