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

Function math_min

third-party/lua-5.4.6/src/lmathlib.c:206–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204
205
206static int math_min (lua_State *L) {
207 int n = lua_gettop(L); /* number of arguments */
208 int imin = 1; /* index of current minimum value */
209 int i;
210 luaL_argcheck(L, n >= 1, 1, "value expected");
211 for (i = 2; i <= n; i++) {
212 if (lua_compare(L, i, imin, LUA_OPLT))
213 imin = i;
214 }
215 lua_pushvalue(L, imin);
216 return 1;
217}
218
219
220static 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