degrees and radians.

Robert George Mayer mayer at acm.org
Sat May 4 13:24:50 EDT 2002


Jim Richardson wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I am trying to get the math module to deal with degrees rather than
> radians. (that it deals with radians for the angular functions like
> sin() isn't mentioned in the docs, which was sort of an eyeopener :)  I
> can't find any info on doing this. I can convert from-to degrees in the
> code calling the function, but that's a bit clunky. Any pointers to an
> FM to R? :)
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> 
> iD8DBQE804+jd90bcYOAWPYRAt9KAKCuqeC4ozuXSaKZ5xY27Wv+k04QuQCcCrCZ
> WyichPnKgXo+GaDdAebsaeU=
> =h+vc
> -----END PGP SIGNATURE-----
> 
> --
> Jim Richardson
>         Anarchist, pagan and proud of it
> http://www.eskimo.com/~warlock
> Linux, from watches to supercomputers, for grandmas and geeks.

Jim -

All the math routines I have ever dealt with use radians.  In
30 years of dealing with this, in Fortran, C, C++ and Python, I
have found what works best for me is to use exclusively radians
internally and convert only where the user will see it - at the
GUI and with any text (not binary) files.  (I think that this
works well, but may not be as natural with a command line program,
where the interface between the user and the program is so simple
to begin with.)  In other words, I just consider the degrees/radians
conversion to be part of the interface between the user and the
program internals.

I find that it help to curse the Babylonian astronomers while
putting all the conversions in place.

- BOB



More information about the Python-list mailing list