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

Function math_min

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

Source from the content-addressed store, hash-verified

168
169
170static int math_min (lua_State *L) {
171 int n = lua_gettop(L); /* number of arguments */
172 lua_Number dmin = luaL_checknumber(L, 1);
173 int i;
174 for (i=2; i<=n; i++) {
175 lua_Number d = luaL_checknumber(L, i);
176 if (d < dmin)
177 dmin = d;
178 }
179 lua_pushnumber(L, dmin);
180 return 1;
181}
182
183
184static int math_max (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