lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 24 March 2014 06:07, Dirk Laurie <dirk.laurie@gmail.com> wrote:
2014-03-24 12:18 GMT+02:00 Bernd Eggink <monoped@sudrala.de>:
> OK, but I guess I rather replace "math.max(a, b)" by "a > b and a or b",
> which is less tricky, but about 4 times faster.

And works for strings too. Maybe just call it "max" then?
 
Keep in mind that math.max and math.min take a vararg.
But in general I think this would be a good change to make