$inRange = (($a <=> $x) * ($b <=> $x)) < 1;
This appears to give the same result:
$inRange = (($a - $x) * ($b - $x)) < 1;
In reply to Re: Range check with unordered limits
by jwkrahn
in thread Range check with unordered limits
by hexcoder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |