MCPcopy Create free account
hub / github.com/NetHack/NetHack / nhl_rn2

Function nhl_rn2

src/nhlua.c:924–935  ·  view source on GitHub ↗

rn2(10) */

Source from the content-addressed store, hash-verified

922
923/* rn2(10) */
924staticfn int
925nhl_rn2(lua_State *L)
926{
927 int argc = lua_gettop(L);
928
929 if (argc == 1)
930 lua_pushinteger(L, rn2((int) luaL_checkinteger(L, 1)));
931 else
932 nhl_error(L, "Wrong args");
933
934 return 1;
935}
936
937/* random(10); -- is the same as rn2(10); */
938/* random(5,8); -- same as 5 + rn2(8); */

Callers

nothing calls this directly

Calls 2

rn2Function · 0.85
nhl_errorFunction · 0.85

Tested by

no test coverage detected