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

Function math_max

third-party/lua-5.2.4/src/lmathlib.c:184–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182
183
184static int math_max (lua_State *L) {
185 int n = lua_gettop(L); /* number of arguments */
186 lua_Number dmax = luaL_checknumber(L, 1);
187 int i;
188 for (i=2; i<=n; i++) {
189 lua_Number d = luaL_checknumber(L, i);
190 if (d > dmax)
191 dmax = d;
192 }
193 lua_pushnumber(L, dmax);
194 return 1;
195}
196
197
198static int math_random (lua_State *L) {

Callers

nothing calls this directly

Calls 3

lua_gettopFunction · 0.70
luaL_checknumberFunction · 0.70
lua_pushnumberFunction · 0.70

Tested by

no test coverage detected