lua-users home
lua-l archive

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


On 24.03.2014 00:06, Bernd Eggink wrote:
Is it really intended that

     a = math.max(1, 2)

returns a = 2.0 (a float)? This change in behaviour, besides being very
counterintuitive, kills a lot of my modules which rely on tostring(a)
giving "2" (without a decimal part). It means that I would have to
surround each such operation with an ifloor() call, which is pretty
ineffective and annoying.
If that can't be changed, I'd suggest an addition of imin(), imax() and
iabs(), witch return integers.

Sorry for the multiple postings, somehow my thunderbird was going wild...

Bernd

--
http://sudrala.de