lua-users home
lua-l archive

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


On Sun, Nov 16, 2014 at 7:14 PM, Eric Wing <ewmailing@gmail.com> wrote:
>> I wish there was some built-in support for this (say, math.to_unsafe_int()
>> or
>> something).
>
> I just noticed math.ifloor() went away.
> Also I just noticed that math.floor returns either a number or integer
> depending on the situation. Wasn't there already an earlier argument
> (that I thought successfully) argued against having functions
> sometimes return different types? (Was it power/exponent?)
>
> Thanks,
> Eric
> --
> Beginning iPhone Games Development
> http://playcontrol.net/iphonegamebook/
>

It was exponent (since 2^3 is an integer but 2^-3 is not) and I'm not
certain that ever reached a consensus.

/s/ Adam