lua-users home
lua-l archive

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


On Sat, May 3, 2014 at 11:31 AM, Tim Hill <drtimhill@gmail.com> wrote:
> local limtied = max(min(input, 1000), 100))
> ->
> local limtied = input : min(1000) : max(100)

Of course, I'd rather see

local limited = clamp(input, 100, 1000)

any day of the week.

/s/ Adam