The Battle for Wesnoth  1.17.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 34 of file lua_mathx.cpp.

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

Referenced by luaW_open().

◆ intf_round()

static int lua_mathx::intf_round ( lua_State L)

Definition at line 61 of file lua_mathx.cpp.

References lua_pushinteger(), lua_tonumber, and n.

Referenced by luaW_open().

◆ luaW_open()

int lua_mathx::luaW_open ( lua_State L)