21#define PI ((lua_Number)(3.1415926535897932384626433832795))
22#define RADIANS_PER_DEGREE ((lua_Number)(PI/180.0))
132#if defined(LUA_COMPAT_LOG10)
174 for (i=2; i<=n; i++) {
188 for (i=2; i<=n; i++) {
220 default:
return luaL_error(L,
"wrong number of arguments");
248#if defined(LUA_COMPAT_LOG10)
LUA_API void lua_pushnumber(lua_State *L, lua_Number n)
LUA_API void lua_setfield(lua_State *L, int idx, const char *k)
LUA_API void lua_pushinteger(lua_State *L, lua_Integer n)
LUA_API int lua_gettop(lua_State *L)
LUALIB_API int luaL_error(lua_State *L, const char *fmt,...)
LUALIB_API lua_Number luaL_checknumber(lua_State *L, int narg)
#define luaL_checkint(L, n)
#define luaL_argcheck(L, cond, numarg, extramsg)
static int math_log10(lua_State *L)
#define lua_isnoneornil(L, n)
LUALIB_API lua_Unsigned luaL_checkunsigned(lua_State *L, int narg)
#define luaL_newlib(L, l)
static int math_max(lua_State *L)
static int math_tan(lua_State *L)
static int math_frexp(lua_State *L)
static int math_pow(lua_State *L)
static int math_fmod(lua_State *L)
#define RADIANS_PER_DEGREE
static int math_tanh(lua_State *L)
static int math_sinh(lua_State *L)
static int math_randomseed(lua_State *L)
static int math_rad(lua_State *L)
static int math_cos(lua_State *L)
static int math_atan(lua_State *L)
LUAMOD_API int luaopen_math(lua_State *L)
static int math_exp(lua_State *L)
static int math_log(lua_State *L)
static int math_sqrt(lua_State *L)
static int math_abs(lua_State *L)
static int math_acos(lua_State *L)
static int math_floor(lua_State *L)
static int math_random(lua_State *L)
static int math_asin(lua_State *L)
static int math_cosh(lua_State *L)
static int math_min(lua_State *L)
static int math_atan2(lua_State *L)
static const luaL_Reg mathlib[]
static int math_deg(lua_State *L)
static int math_sin(lua_State *L)
static int math_ldexp(lua_State *L)
static int math_modf(lua_State *L)
static int math_ceil(lua_State *L)