MCPcopy Create free account
hub / github.com/Tencent/sluaunreal / luaopen_math

Function luaopen_math

Plugins/slua_unreal/External/lua/lmathlib.cpp:393–404  ·  view source on GitHub ↗

** Open math library */

Source from the content-addressed store, hash-verified

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

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