#include <stdlib.h>#include <math.h>#include "lua.h"#include "lauxlib.h"#include "lualib.h"Go to the source code of this file.
Defines | |
| #define | lmathlib_c |
| #define | LUA_LIB |
Functions | |
| static int | math_abs (lua_State *L) |
| static int | math_sin (lua_State *L) |
| static int | math_cos (lua_State *L) |
| static int | math_tan (lua_State *L) |
| static int | math_acos (lua_State *L) |
| static int | math_ceil (lua_State *L) |
| static int | math_floor (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_min (lua_State *L) |
| static int | math_max (lua_State *L) |
| LUALIB_API int | luaopen_math (lua_State *L) |
Variables | |
| static const luaL_Reg | mathlib [] |
| #define lmathlib_c |
Definition at line 11 of file lmathlib.cpp.
| #define LUA_LIB |
Definition at line 12 of file lmathlib.cpp.
| LUALIB_API int luaopen_math | ( | lua_State * | L | ) |
| static int math_abs | ( | lua_State * | L | ) | [static] |
Definition at line 20 of file lmathlib.cpp.
References fixed::abs(), fixed::getInternal(), lua_pushnumber(), and luaL_checknumber().
| static int math_acos | ( | lua_State * | L | ) | [static] |
Definition at line 52 of file lmathlib.cpp.
References fixed::acos(), fixed::getInternal(), lua_pushnumber(), and luaL_checknumber().
| static int math_ceil | ( | lua_State * | L | ) | [static] |
Definition at line 60 of file lmathlib.cpp.
References fixed::ceil(), fixed::getInternal(), lua_pushnumber(), and luaL_checknumber().
| static int math_cos | ( | lua_State * | L | ) | [static] |
Definition at line 36 of file lmathlib.cpp.
References fixed::cos(), fixed::getInternal(), lua_pushnumber(), and luaL_checknumber().
| static int math_exp | ( | lua_State * | L | ) | [static] |
Definition at line 109 of file lmathlib.cpp.
References fixed::exp(), fixed::getInternal(), lua_pushnumber(), and luaL_checknumber().
| static int math_floor | ( | lua_State * | L | ) | [static] |
Definition at line 68 of file lmathlib.cpp.
References fixed::floor(), fixed::getInternal(), lua_pushnumber(), and luaL_checknumber().
| static int math_log | ( | lua_State * | L | ) | [static] |
Definition at line 93 of file lmathlib.cpp.
References fixed::getInternal(), fixed::log(), lua_pushnumber(), and luaL_checknumber().
| static int math_log10 | ( | lua_State * | L | ) | [static] |
Definition at line 101 of file lmathlib.cpp.
References fixed::getInternal(), fixed::log10(), lua_pushnumber(), and luaL_checknumber().
| static int math_max | ( | lua_State * | L | ) | [static] |
Definition at line 131 of file lmathlib.cpp.
References lua_gettop(), lua_pushnumber(), and luaL_checknumber().
| static int math_min | ( | lua_State * | L | ) | [static] |
Definition at line 117 of file lmathlib.cpp.
References lua_gettop(), lua_pushnumber(), and luaL_checknumber().
| static int math_pow | ( | lua_State * | L | ) | [static] |
Definition at line 84 of file lmathlib.cpp.
References fixed::getInternal(), lua_pushnumber(), luaL_checknumber(), and fixed::pow().
| static int math_sin | ( | lua_State * | L | ) | [static] |
Definition at line 28 of file lmathlib.cpp.
References fixed::getInternal(), lua_pushnumber(), luaL_checknumber(), and fixed::sin().
| static int math_sqrt | ( | lua_State * | L | ) | [static] |
Definition at line 76 of file lmathlib.cpp.
References fixed::getInternal(), lua_pushnumber(), luaL_checknumber(), and fixed::sqrt().
| static int math_tan | ( | lua_State * | L | ) | [static] |
Definition at line 44 of file lmathlib.cpp.
References fixed::getInternal(), lua_pushnumber(), luaL_checknumber(), and fixed::tan().
Initial value:
{
{"abs", math_abs},
{"acos", math_acos},
{"ceil", math_ceil},
{"cos", math_cos},
{"exp", math_exp},
{"floor", math_floor},
{"log10", math_log10},
{"log", math_log},
{"max", math_max},
{"min", math_min},
{"pow", math_pow},
{"sin", math_sin},
{"sqrt", math_sqrt},
{"tan", math_tan},
{NULL, NULL}
}
Definition at line 146 of file lmathlib.cpp.
1.5.3