** Open math library */
| 269 | ** Open math library |
| 270 | */ |
| 271 | LUAMOD_API int luaopen_math (lua_State *L) { |
| 272 | luaL_newlib(L, mathlib); |
| 273 | lua_pushnumber(L, PI); |
| 274 | lua_setfield(L, -2, "pi"); |
| 275 | lua_pushnumber(L, HUGE_VAL); |
| 276 | lua_setfield(L, -2, "huge"); |
| 277 | return 1; |
| 278 | } |
| 279 |
nothing calls this directly
no test coverage detected