lua-users home
lua-l archive

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


You can declare your own function:
function in_range(x,a,b) return a <= x and x <= b end


On 12 November 2015 at 09:58, Marco Atzori <marco.atzori.1983@gmail.com> wrote:
There is a formula to test whether a number is included in a range? For example, if 3 is between -8 and 6. I tried in the math library, but I found nothing.