MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / Int

Method Int

LuaSTGPlus/LuaWrapper.cpp:239–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237 return 1;
238 }
239 static int Int(lua_State* L)LNOEXCEPT
240 {
241 fcyRandomWELL512* p = static_cast<fcyRandomWELL512*>(luaL_checkudata(L, 1, TYPENAME_RANDGEN));
242 int a = luaL_checkinteger(L, 2), b = luaL_checkinteger(L, 3);
243 lua_pushinteger(L, a + static_cast<fInt>(p->GetRandUInt(static_cast<fuInt>(::max(b - a, 0)))));
244 return 1;
245 }
246 static int Float(lua_State* L)LNOEXCEPT
247 {
248 fcyRandomWELL512* p = static_cast<fcyRandomWELL512*>(luaL_checkudata(L, 1, TYPENAME_RANDGEN));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected