MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / luaopen_math

Function luaopen_math

ThirdParty/lua/lua/lmathlib.c:392–403  ·  view source on GitHub ↗

** Open math library */

Source from the content-addressed store, hash-verified

390** Open math library
391*/
392LUAMOD_API int luaopen_math (lua_State *L) {
393 luaL_newlib(L, mathlib);
394 lua_pushnumber(L, PI);
395 lua_setfield(L, -2, "pi");
396 lua_pushnumber(L, (lua_Number)HUGE_VAL);
397 lua_setfield(L, -2, "huge");
398 lua_pushinteger(L, LUA_MAXINTEGER);
399 lua_setfield(L, -2, "maxinteger");
400 lua_pushinteger(L, LUA_MININTEGER);
401 lua_setfield(L, -2, "mininteger");
402 return 1;
403}
404

Callers

nothing calls this directly

Calls 3

lua_pushnumberFunction · 0.85
lua_setfieldFunction · 0.85
lua_pushintegerFunction · 0.85

Tested by

no test coverage detected