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
proposal: math: add deg <-> rad conversion constants #19587
Comments
Instead of documenting it in the comments const (
DegToRad = Pi/180
...
) directly with no loss of precision. But the same can be done in client's code ( |
Agree with @cznic - if getting these constants is so trivial, why should they be included in |
One thing I like about go is that many thinks are just easy to do without a lot of thinking. It the same as with constants like |
@niondir I think the policy regarding what convenience constants to include in std is directly influenced by how often they would be used. Perhaps this warrants some investigation, for example to see how often |
I'm against this. Even if I have a constant |
@griesemer captured my own thinking well. |
Sounds like there's not support for this. Marking declined. |
I was doing some image processing and with rotation I noticed that all the trigonometric functions are operating on rads. But people can better think in deg e.g. "I want to turn my picture by 90°" and not by 1,5708 rads.
I would like to add some constants to the math package:
What version of Go are you using (
go version
)?1.8
What operating system and processor architecture are you using (
go env
)?windows amd64
The text was updated successfully, but these errors were encountered: