[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.3: Should min/max return a float, if it is given integer?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Thu, 5 Jun 2014 10:03:49 +0200
2014-06-05 2:02 GMT+02:00 Hisham <h@hisham.hm>:
> But the argument of having math.max and math.min preserve integers
> (and their precision) has, in my opinion, a very strong case.
> (Especially since math.max and math.min _are_ convenience functions
> after all, so the "roll your own" answer does not apply.)
Maybe there is a case for taking them out of the math library
and putting them back into global, with `max(a,b)` meaning
exactly the same as "(b>a) and b or a" so that they will apply
to anything, particularly strings.