MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaopen_math

Function luaopen_math

extlibs/lua/src/lmathlib.c:750–762  ·  view source on GitHub ↗

** Open math library */

Source from the content-addressed store, hash-verified

748** Open math library
749*/
750LUAMOD_API int luaopen_math (lua_State *L) {
751 luaL_newlib(L, mathlib);
752 lua_pushnumber(L, PI);
753 lua_setfield(L, -2, "pi");
754 lua_pushnumber(L, (lua_Number)HUGE_VAL);
755 lua_setfield(L, -2, "huge");
756 lua_pushinteger(L, LUA_MAXINTEGER);
757 lua_setfield(L, -2, "maxinteger");
758 lua_pushinteger(L, LUA_MININTEGER);
759 lua_setfield(L, -2, "mininteger");
760 setrandfunc(L);
761 return 1;
762}
763

Callers

nothing calls this directly

Calls 4

lua_pushnumberFunction · 0.85
lua_setfieldFunction · 0.85
lua_pushintegerFunction · 0.85
setrandfuncFunction · 0.85

Tested by

no test coverage detected