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

Math - radians->degrees and degrees->radians #749

Closed
volodymyrprokopyuk opened this issue Feb 21, 2021 · 4 comments
Closed

Math - radians->degrees and degrees->radians #749

volodymyrprokopyuk opened this issue Feb 21, 2021 · 4 comments

Comments

@volodymyrprokopyuk
Copy link

Hello,

It would be very convenient if the below definitions were part of some Gauche module. Recently I have to define them myself to do some calculations.

(use math.const)

(define (radians->degrees r)
  (* r 180/pi))

(define (degrees->radians d)
  (* d pi/180))

Would you consider including them as part of Gauche distribution as they are needed when doing trigonometry calculations?

@shirok
Copy link
Owner

shirok commented Feb 23, 2021

It looks reasonable to have them. Do you know other implementations having those procedures? If there are, I'd like to have the same name.

@volodymyrprokopyuk
Copy link
Author

My small and quick investigation on the naming in other Schemes and Lisps

I'd go with the names in plural as is spoken in mathematics. But the choice of naming could also depend on the naming style and consistency in Gauche libraries, however I do not think Gauche strictly follows singular naming everywhere.

@shirok
Copy link
Owner

shirok commented Feb 24, 2021

Thanks! The fluctuation is a bit concern, but I'd go with plural names.

@volodymyrprokopyuk
Copy link
Author

Thank you very much!

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

No branches or pull requests

2 participants