--- In [email protected], andrew clarke <m...@...> wrote: > > On Sat 2009-03-07 07:16:48 UTC-0700, Thomas Hruska (thru...@...) wrote: > > > >> You can assign the float pi =3.141592653589793. > > > > > > Better yet, use M_PI from math.h, part of the standard library. > > > > Hmm...I seem to recall defining M_PI for some compiler... > > > > http://c-faq.com/fp/mpi.html > > > > Ah. NOT Standard, that's why I remember doing that. > > Very interesting! All these years of using C, I've never come across > a C compiler without M_PI. Then again, it's not often I need to do > floating point arithmetic. Thanks for that, I stand corrected. :) > As pointed out, not all compilers include M_PI in their version of math.h. lcc does and Dev_C++ does not for examples. Howsoever, that was not the point. The responder left the impression that the conversion was not straightforward, albeit perchance I am in gross error. In the majority of programming languages I have used, one must implement trigonometric calculations using angels expressed in radians rather than degrees. I was merely attempting to indicate the transformation was extremely simple.
Kocmotex
