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

Function math_floor

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

Source from the content-addressed store, hash-verified

100
101
102static int math_floor (lua_State *L) {
103 if (lua_isinteger(L, 1))
104 lua_settop(L, 1); /* integer is its own floor */
105 else {
106 lua_Number d = l_mathop(floor)(luaL_checknumber(L, 1));
107 pushnumint(L, d);
108 }
109 return 1;
110}
111
112
113static int math_ceil (lua_State *L) {

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected