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

Function math_max

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

Source from the content-addressed store, hash-verified

246
247
248static int math_max (lua_State *L) {
249 int n = lua_gettop(L); /* number of arguments */
250 int imax = 1; /* index of current maximum value */
251 int i;
252 luaL_argcheck(L, n >= 1, 1, "value expected");
253 for (i = 2; i <= n; i++) {
254 if (lua_compare(L, imax, i, LUA_OPLT))
255 imax = i;
256 }
257 lua_pushvalue(L, imax);
258 return 1;
259}
260
261
262static int math_type (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