in reply to Re: IF condition with a range (updated)
in thread IF condition with a range
if (abs($y-$x) <= 1)
It's perhaps worth noting that, with floats, if $x == $y it does not necessarily follow that $x - $y == 0, or that abs($x - $y) <= 1
If $x and $y are both infinities (of the same sign) then the first condition holds true, while the second and third are false.
Cheers,
Rob