The Battle for Wesnoth  1.19.0-dev
lua_mathx Namespace Reference


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)

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

Definition at line 32 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)

Definition at line 59 of file lua_mathx.cpp.

References n.

Referenced by luaW_open().

◆ luaW_open()

int lua_mathx::luaW_open ( lua_State *  L)

Definition at line 65 of file lua_mathx.cpp.

References intf_random(), and intf_round().

Referenced by lua_kernel_base::lua_kernel_base().