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