21#define PI (3.14159265358979323846)
22#define RADIANS_PER_DEGREE (PI/180.0)
157 for (i=2; i<=n; i++) {
171 for (i=2; i<=n; i++) {
203 default:
return luaL_error(L,
"wrong number of arguments");
257#if defined(LUA_COMPAT_MOD)
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 void lua_getfield(lua_State *L, int idx, const char *k)
LUA_API int lua_gettop(lua_State *L)
LUALIB_API int luaL_error(lua_State *L, const char *fmt,...)
LUALIB_API void luaL_register(lua_State *L, const char *libname, const luaL_Reg *l)
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_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_log10(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)
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[]
LUALIB_API int luaopen_math(lua_State *L)
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)