[Bf-committers] last modifs in GHOST_WindowWin32.cpp : "M_PI" is
an unknown var for MSVC tools
jmsoler at free.fr
jmsoler at free.fr
Sun Nov 12 19:14:50 CET 2006
Selon Stephen Swaney <sswaney at centurytel.net>:
> On Sun, Nov 12, 2006 at 05:25:19PM +0100, jean-michel soler wrote:
> > in
> >
>
http://projects.blender.org/viewcvs/viewcvs.cgi/blender/intern/ghost/intern/GHOST_WindowWin32.cpp.diff?r1=1.12&r2=1.13&cvsroot=bf-blender
> >
> > /* convert raw fixed point data to radians */
> > altRad =
> > (fabs((float)ort.orAltitude)/(float)m_maxAltitude) * M_PI/2.0;
> > azmRad =
> > ((float)ort.orAzimuth/(float)m_maxAzimuth) * M_PI*2.0;
>
>
> M_PI is a *very* common constant in math code.
>
> One one hand I'm stunned M_PI is not defined automagically
> and on the other, this being msvc, I'm not suprised.
>
> A little googling turns up this solution.
>
> #ifdef WIN32
> #define _USE_MATH_DEFINES
> #endif
>
Sorry for my poor english .
More information about the Bf-committers
mailing list