lmathlib.c File Reference

Go to the source code of this file.

Defines

#define lmathlib_c
#define LUA_LIB
#define PI   (3.14159265358979323846)
#define RADIANS_PER_DEGREE   (PI/180.0)

Functions

static int math_abs (lua_State *L)
static int math_sin (lua_State *L)
static int math_sinh (lua_State *L)
static int math_cos (lua_State *L)
static int math_cosh (lua_State *L)
static int math_tan (lua_State *L)
static int math_tanh (lua_State *L)
static int math_asin (lua_State *L)
static int math_acos (lua_State *L)
static int math_atan (lua_State *L)
static int math_atan2 (lua_State *L)
static int math_ceil (lua_State *L)
static int math_floor (lua_State *L)
static int math_fmod (lua_State *L)
static int math_modf (lua_State *L)
static int math_sqrt (lua_State *L)
static int math_pow (lua_State *L)
static int math_log (lua_State *L)
static int math_log10 (lua_State *L)
static int math_exp (lua_State *L)
static int math_deg (lua_State *L)
static int math_rad (lua_State *L)
static int math_frexp (lua_State *L)
static int math_ldexp (lua_State *L)
static int math_min (lua_State *L)
static int math_max (lua_State *L)
static int math_random (lua_State *L)
static int math_randomseed (lua_State *L)
LUALIB_API int luaopen_math (lua_State *L)

Variables

static const luaL_Reg mathlib []

Define Documentation

#define lmathlib_c

Definition at line 11 of file lmathlib.c.

#define LUA_LIB

Definition at line 12 of file lmathlib.c.

#define PI   (3.14159265358979323846)

Definition at line 21 of file lmathlib.c.

Referenced by luaopen_math().

#define RADIANS_PER_DEGREE   (PI/180.0)

Definition at line 22 of file lmathlib.c.

Referenced by math_deg(), and math_rad().


Function Documentation

LUALIB_API int luaopen_math ( lua_State L  ) 
static int math_abs ( lua_State L  )  [static]

Definition at line 26 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_acos ( lua_State L  )  [static]

Definition at line 66 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_asin ( lua_State L  )  [static]

Definition at line 61 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_atan ( lua_State L  )  [static]

Definition at line 71 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_atan2 ( lua_State L  )  [static]

Definition at line 76 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_ceil ( lua_State L  )  [static]

Definition at line 81 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_cos ( lua_State L  )  [static]

Definition at line 41 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_cosh ( lua_State L  )  [static]

Definition at line 46 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_deg ( lua_State L  )  [static]

Definition at line 129 of file lmathlib.c.

References lua_pushnumber(), luaL_checknumber(), and RADIANS_PER_DEGREE.

static int math_exp ( lua_State L  )  [static]

Definition at line 124 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_floor ( lua_State L  )  [static]

Definition at line 86 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_fmod ( lua_State L  )  [static]

Definition at line 91 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_frexp ( lua_State L  )  [static]

Definition at line 139 of file lmathlib.c.

References lua_pushinteger(), lua_pushnumber(), and luaL_checknumber().

static int math_ldexp ( lua_State L  )  [static]

Definition at line 146 of file lmathlib.c.

References lua_pushnumber(), luaL_checkint, and luaL_checknumber().

static int math_log ( lua_State L  )  [static]

Definition at line 114 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_log10 ( lua_State L  )  [static]

Definition at line 119 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_max ( lua_State L  )  [static]

Definition at line 167 of file lmathlib.c.

References d(), lua_gettop(), lua_pushnumber(), and luaL_checknumber().

static int math_min ( lua_State L  )  [static]

Definition at line 153 of file lmathlib.c.

References d(), lua_gettop(), lua_pushnumber(), and luaL_checknumber().

static int math_modf ( lua_State L  )  [static]

Definition at line 96 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_pow ( lua_State L  )  [static]

Definition at line 109 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_rad ( lua_State L  )  [static]

Definition at line 134 of file lmathlib.c.

References lua_pushnumber(), luaL_checknumber(), and RADIANS_PER_DEGREE.

static int math_random ( lua_State L  )  [static]

Definition at line 181 of file lmathlib.c.

References lua_gettop(), lua_pushnumber(), luaL_argcheck, luaL_checkint, and luaL_error().

static int math_randomseed ( lua_State L  )  [static]

Definition at line 209 of file lmathlib.c.

References luaL_checkint.

static int math_sin ( lua_State L  )  [static]

Definition at line 31 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_sinh ( lua_State L  )  [static]

Definition at line 36 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_sqrt ( lua_State L  )  [static]

Definition at line 104 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_tan ( lua_State L  )  [static]

Definition at line 51 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().

static int math_tanh ( lua_State L  )  [static]

Definition at line 56 of file lmathlib.c.

References lua_pushnumber(), and luaL_checknumber().


Variable Documentation

const luaL_Reg mathlib[] [static]

Definition at line 215 of file lmathlib.c.


ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:50:00 2011 by Doxygen 1.6.1