MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / pushnumint

Function pushnumint

extlibs/lua/src/lmathlib.c:86–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84
85
86static void pushnumint (lua_State *L, lua_Number d) {
87 lua_Integer n;
88 if (lua_numbertointeger(d, &n)) /* does 'd' fit in an integer? */
89 lua_pushinteger(L, n); /* result is integer */
90 else
91 lua_pushnumber(L, d); /* result is float */
92}
93
94
95static int math_floor (lua_State *L) {

Callers 3

math_floorFunction · 0.85
math_ceilFunction · 0.85
math_modfFunction · 0.85

Calls 2

lua_pushintegerFunction · 0.85
lua_pushnumberFunction · 0.85

Tested by

no test coverage detected