Skip to content

Instantly share code, notes, and snippets.

View wittx's full-sized avatar

Patryk Wittbrodt wittx

View GitHub Profile
@wittx
wittx / max.lua
Created August 11, 2015 10:59
maxTableValue
local function maxTableValue(tab)
if not tab[1] then return 0; end
local value = tab[1];
for i = 2, #tab do
if value < tab[i] then
value = tab[i];
end
end
return value;