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

Function math_min

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

Source from the content-addressed store, hash-verified

232
233
234static int math_min (lua_State *L) {
235 int n = lua_gettop(L); /* number of arguments */
236 int imin = 1; /* index of current minimum value */
237 int i;
238 luaL_argcheck(L, n >= 1, 1, "value expected");
239 for (i = 2; i <= n; i++) {
240 if (lua_compare(L, i, imin, LUA_OPLT))
241 imin = i;
242 }
243 lua_pushvalue(L, imin);
244 return 1;
245}
246
247
248static 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