MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / luaopen_math

Function luaopen_math

ogsr_engine/LuaJIT/src/lib_math.c:194–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192#include "lj_libdef.h"
193
194LUALIB_API int luaopen_math(lua_State *L)
195{
196 PRNGState *rs = (PRNGState *)lua_newuserdata(L, sizeof(PRNGState));
197 lj_prng_seed_fixed(rs);
198 LJ_LIB_REG(L, LUA_MATHLIBNAME, math);
199#if defined(LUA_COMPAT_MOD) && !LJ_52
200 lua_getfield(L, -1, "fmod");
201 lua_setfield(L, -2, "mod");
202#endif
203 return 1;
204}
205

Callers

nothing calls this directly

Calls 4

lj_prng_seed_fixedFunction · 0.85
lua_newuserdataFunction · 0.70
lua_getfieldFunction · 0.70
lua_setfieldFunction · 0.70

Tested by

no test coverage detected