| 91 | |
| 92 | |
| 93 | static void pushnumint (lua_State *L, lua_Number d) { |
| 94 | lua_Integer n; |
| 95 | if (lua_numbertointeger(d, &n)) /* does 'd' fit in an integer? */ |
| 96 | lua_pushinteger(L, n); /* result is integer */ |
| 97 | else |
| 98 | lua_pushnumber(L, d); /* result is float */ |
| 99 | } |
| 100 | |
| 101 | |
| 102 | static int math_floor (lua_State *L) { |
no test coverage detected