MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / math_floor

Function math_floor

3rd/lua-5.4.3/src/lmathlib.c:95–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93
94
95static 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
106static int math_ceil (lua_State *L) {

Callers

nothing calls this directly

Calls 4

lua_settopFunction · 0.85
luaL_checknumberFunction · 0.85
pushnumintFunction · 0.85
lua_isintegerFunction · 0.70

Tested by

no test coverage detected