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

Function luaopen_math

third-party/lua-5.3.5/src/lmathlib.c:398–409  ·  view source on GitHub ↗

** Open math library */

Source from the content-addressed store, hash-verified

396** Open math library
397*/
398LUAMOD_API int luaopen_math (lua_State *L) {
399 luaL_newlib(L, mathlib);
400 lua_pushnumber(L, PI);
401 lua_setfield(L, -2, "pi");
402 lua_pushnumber(L, (lua_Number)HUGE_VAL);
403 lua_setfield(L, -2, "huge");
404 lua_pushinteger(L, LUA_MAXINTEGER);
405 lua_setfield(L, -2, "maxinteger");
406 lua_pushinteger(L, LUA_MININTEGER);
407 lua_setfield(L, -2, "mininteger");
408 return 1;
409}
410

Callers

nothing calls this directly

Calls 3

lua_pushnumberFunction · 0.70
lua_setfieldFunction · 0.70
lua_pushintegerFunction · 0.70

Tested by

no test coverage detected