For conformance with general expectations, use M_PI, not PI.
(This is in global.h, not RageUtil.h, because we include math.h in global.h, and M_PI is generally associated with math.h. As some systems do provide it in math.h, if we put it in RageUtil.h then we'll suffer breakage when people on those systems use M_PI without including RageUtil.h.)
This commit is contained in:
@@ -145,6 +145,11 @@ typedef StdString::CStdString RString;
|
||||
|
||||
/* Define a few functions if necessary */
|
||||
#include <cmath>
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.1415926535897932384626433832795
|
||||
#endif
|
||||
|
||||
#ifdef NEED_POWF
|
||||
inline float powf( float x, float y ) CONST_FUNCTION;
|
||||
float powf( float x, float y ) { return float( pow(double(x), double(y)) ); }
|
||||
|
||||
Reference in New Issue
Block a user