RetroArch
Macros | Functions | Variables
lmathlib.c File Reference
#include "lprefix.h"
#include <stdlib.h>
#include <math.h>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
Include dependency graph for lmathlib.c:

Macros

#define lmathlib_c
 
#define LUA_LIB
 
#define PI   (l_mathop(3.141592653589793238462643383279502884))
 
#define l_rand()   rand()
 
#define l_srand(x)   srand(x)
 
#define L_RANDMAX   RAND_MAX
 

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_asin (lua_State *L)
 
static int math_acos (lua_State *L)
 
static int math_atan (lua_State *L)
 
static int math_toint (lua_State *L)
 
static void pushnumint (lua_State *L, lua_Number d)
 
static int math_floor (lua_State *L)
 
static int math_ceil (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_ult (lua_State *L)
 
static int math_log (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_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)
 
static int math_type (lua_State *L)
 
LUAMOD_API int luaopen_math (lua_State *L)
 

Variables

static const luaL_Reg mathlib []
 

Macro Definition Documentation

◆ l_rand

#define l_rand ( )    rand()

◆ L_RANDMAX

#define L_RANDMAX   RAND_MAX

◆ l_srand

#define l_srand (   x)    srand(x)

◆ lmathlib_c

#define lmathlib_c

◆ LUA_LIB

#define LUA_LIB

◆ PI

#define PI   (l_mathop(3.141592653589793238462643383279502884))

Function Documentation

◆ luaopen_math()

LUAMOD_API int luaopen_math ( lua_State L)
Here is the call graph for this function:

◆ math_abs()

static int math_abs ( lua_State L)
static
Here is the call graph for this function:

◆ math_acos()

static int math_acos ( lua_State L)
static
Here is the call graph for this function:

◆ math_asin()

static int math_asin ( lua_State L)
static
Here is the call graph for this function:

◆ math_atan()

static int math_atan ( lua_State L)
static
Here is the call graph for this function:

◆ math_ceil()

static int math_ceil ( lua_State L)
static
Here is the call graph for this function:

◆ math_cos()

static int math_cos ( lua_State L)
static
Here is the call graph for this function:

◆ math_deg()

static int math_deg ( lua_State L)
static
Here is the call graph for this function:

◆ math_exp()

static int math_exp ( lua_State L)
static
Here is the call graph for this function:

◆ math_floor()

static int math_floor ( lua_State L)
static
Here is the call graph for this function:

◆ math_fmod()

static int math_fmod ( lua_State L)
static
Here is the call graph for this function:

◆ math_log()

static int math_log ( lua_State L)
static
Here is the call graph for this function:

◆ math_max()

static int math_max ( lua_State L)
static
Here is the call graph for this function:

◆ math_min()

static int math_min ( lua_State L)
static
Here is the call graph for this function:

◆ math_modf()

static int math_modf ( lua_State L)
static
Here is the call graph for this function:

◆ math_rad()

static int math_rad ( lua_State L)
static
Here is the call graph for this function:

◆ math_random()

static int math_random ( lua_State L)
static
Here is the call graph for this function:

◆ math_randomseed()

static int math_randomseed ( lua_State L)
static
Here is the call graph for this function:

◆ math_sin()

static int math_sin ( lua_State L)
static
Here is the call graph for this function:

◆ math_sqrt()

static int math_sqrt ( lua_State L)
static
Here is the call graph for this function:

◆ math_tan()

static int math_tan ( lua_State L)
static
Here is the call graph for this function:

◆ math_toint()

static int math_toint ( lua_State L)
static
Here is the call graph for this function:

◆ math_type()

static int math_type ( lua_State L)
static
Here is the call graph for this function:

◆ math_ult()

static int math_ult ( lua_State L)
static
Here is the call graph for this function:

◆ pushnumint()

static void pushnumint ( lua_State L,
lua_Number  d 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ mathlib

const luaL_Reg mathlib[]
static