[SDL] Re: cos,sin,tan

Andy Howe parasite at cooper-mtn.com
Sun Jun 18 21:53:58 PDT 2000


> Isn't there an "M_PI" constant defined in math.h that one can use
> instead of "3.14159...."?
> 
> I use it, but I'm not sure if it's a Un*x-only kinda thing...
I am pretty sure it is a Unix only thing, i tried to compile a game that
used the M_PI macro and the compiler complained. I think that PI works
on windows machines but im not sure. If it doesnt, just add the
following code:

#ifndef M_PI
#define M_PI           3.14159265358979323846  /* pi */
#endif

---Parasite



More information about the SDL mailing list