** Open math library */
| 748 | ** Open math library |
| 749 | */ |
| 750 | LUAMOD_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 |
nothing calls this directly
no test coverage detected