| 93 | |
| 94 | |
| 95 | static int math_floor (lua_State *L) { |
| 96 | if (lua_isinteger(L, 1)) |
| 97 | lua_settop(L, 1); /* integer is its own floor */ |
| 98 | else { |
| 99 | lua_Number d = l_mathop(floor)(luaL_checknumber(L, 1)); |
| 100 | pushnumint(L, d); |
| 101 | } |
| 102 | return 1; |
| 103 | } |
| 104 | |
| 105 | |
| 106 | static int math_ceil (lua_State *L) { |
nothing calls this directly
no test coverage detected