MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / pushnumint

Function pushnumint

third-party/lua-5.5.0/src/lmathlib.c:93–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91
92
93static 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
102static int math_floor (lua_State *L) {

Callers 3

math_floorFunction · 0.70
math_ceilFunction · 0.70
math_modfFunction · 0.70

Calls 2

lua_pushintegerFunction · 0.70
lua_pushnumberFunction · 0.70

Tested by

no test coverage detected