** Open math library */
| 396 | ** Open math library |
| 397 | */ |
| 398 | LUAMOD_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 |
nothing calls this directly
no test coverage detected