MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaopen_math

Function luaopen_math

third-party/lua-5.5.0/src/lmathlib.c:752–764  ·  view source on GitHub ↗

** Open math library */

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

lua_pushnumberFunction · 0.70
lua_setfieldFunction · 0.70
lua_pushintegerFunction · 0.70
setrandfuncFunction · 0.70

Tested by

no test coverage detected