** Open math library */
| 766 | ** Open math library |
| 767 | */ |
| 768 | LUAMOD_API int luaopen_math (lua_State *L) { |
| 769 | luaL_newlib(L, mathlib); |
| 770 | lua_pushnumber(L, PI); |
| 771 | lua_setfield(L, -2, "pi"); |
| 772 | lua_pushnumber(L, (lua_Number)HUGE_VAL); |
| 773 | lua_setfield(L, -2, "huge"); |
| 774 | lua_pushinteger(L, LUA_MAXINTEGER); |
| 775 | lua_setfield(L, -2, "maxinteger"); |
| 776 | lua_pushinteger(L, LUA_MININTEGER); |
| 777 | lua_setfield(L, -2, "mininteger"); |
| 778 | setrandfunc(L); |
| 779 | return 1; |
| 780 | } |
| 781 |
nothing calls this directly
no test coverage detected