** Open math library */
| 390 | ** Open math library |
| 391 | */ |
| 392 | LUAMOD_API int luaopen_math (lua_State *L) { |
| 393 | luaL_newlib(L, mathlib); |
| 394 | lua_pushnumber(L, PI); |
| 395 | lua_setfield(L, -2, "pi"); |
| 396 | lua_pushnumber(L, (lua_Number)HUGE_VAL); |
| 397 | lua_setfield(L, -2, "huge"); |
| 398 | lua_pushinteger(L, LUA_MAXINTEGER); |
| 399 | lua_setfield(L, -2, "maxinteger"); |
| 400 | lua_pushinteger(L, LUA_MININTEGER); |
| 401 | lua_setfield(L, -2, "mininteger"); |
| 402 | return 1; |
| 403 | } |
| 404 |
nothing calls this directly
no test coverage detected