diff options
author | dhewg | 2011-03-19 11:24:06 +0100 |
---|---|---|
committer | dhewg | 2011-03-19 11:24:06 +0100 |
commit | 2def212de75b3885738c4db188f0a42b712bd48f (patch) | |
tree | 03657dca73b120b0e80c73346dac1e47ec543d6a /engines/sword25/util/lua | |
parent | a4c05b1632940b3f2003055e0c64970b4b053f32 (diff) | |
download | scummvm-rg350-2def212de75b3885738c4db188f0a42b712bd48f.tar.gz scummvm-rg350-2def212de75b3885738c4db188f0a42b712bd48f.tar.bz2 scummvm-rg350-2def212de75b3885738c4db188f0a42b712bd48f.zip |
ALL: s/PI/M_PI/
Tip of the day: git grep -w PI
Diffstat (limited to 'engines/sword25/util/lua')
-rw-r--r-- | engines/sword25/util/lua/lmathlib.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/engines/sword25/util/lua/lmathlib.cpp b/engines/sword25/util/lua/lmathlib.cpp index ed50539f1f..bb9c6ed442 100644 --- a/engines/sword25/util/lua/lmathlib.cpp +++ b/engines/sword25/util/lua/lmathlib.cpp @@ -16,12 +16,7 @@ #include "lauxlib.h" #include "lualib.h" - -#undef PI -#define PI (3.14159265358979323846) -#define RADIANS_PER_DEGREE (PI/180.0) - - +#define RADIANS_PER_DEGREE (M_PI/180.0) static int math_abs (lua_State *L) { lua_pushnumber(L, fabs(luaL_checknumber(L, 1))); @@ -250,7 +245,7 @@ static const luaL_Reg mathlib[] = { */ LUALIB_API int luaopen_math (lua_State *L) { luaL_register(L, LUA_MATHLIBNAME, mathlib); - lua_pushnumber(L, PI); + lua_pushnumber(L, M_PI); lua_setfield(L, -2, "pi"); #if defined(MACOSX) && defined(__GNUC__) && ! defined( __XLC__ ) // WORKAROUND for a bug in the Mac OS X 10.2.8 SDK. It defines |