The Battle for Wesnoth  1.19.5+dev
Functions
lua_mathx Namespace Reference

Functions

static int intf_random (lua_State *L)
 Returns a random number, same interface as math.random. More...
 
static int intf_round (lua_State *L)
 
int luaW_open (lua_State *L)
 

Function Documentation

◆ intf_random()

static int lua_mathx::intf_random ( lua_State *  L)
static

Returns a random number, same interface as math.random.

Definition at line 28 of file lua_mathx.cpp.

References randomness::generator, lua_push(), and randomness::rng::next_random().

Referenced by luaW_open().

◆ intf_round()

static int lua_mathx::intf_round ( lua_State *  L)
static

Definition at line 55 of file lua_mathx.cpp.

References n.

Referenced by luaW_open().

◆ luaW_open()

int lua_mathx::luaW_open ( lua_State *  L)

Definition at line 61 of file lua_mathx.cpp.

References intf_random(), and intf_round().

Referenced by lua_kernel_base::lua_kernel_base().