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

Function math_min

third-party/lua-5.3.5/src/lmathlib.c:215–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213
214
215static int math_min (lua_State *L) {
216 int n = lua_gettop(L); /* number of arguments */
217 int imin = 1; /* index of current minimum value */
218 int i;
219 luaL_argcheck(L, n >= 1, 1, "value expected");
220 for (i = 2; i <= n; i++) {
221 if (lua_compare(L, i, imin, LUA_OPLT))
222 imin = i;
223 }
224 lua_pushvalue(L, imin);
225 return 1;
226}
227
228
229static int math_max (lua_State *L) {

Callers

nothing calls this directly

Calls 3

lua_gettopFunction · 0.70
lua_compareFunction · 0.70
lua_pushvalueFunction · 0.70

Tested by

no test coverage detected