lua-users home
lua-l archive

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


On Fri, 7 Jan 2022 at 18:18, Coda Highland <> wrote:
> Does it have to be //1? Because the usual idiom for "coerce to int" in other languages, especially Javascript, is |0, which works in Lua 5.3+.

Nice to know. I still prefer, and would recommend, math.tointeger,
which I normally just store as "local INT" or a similar thing.