would work for numbers >= 0.$retval = $number > 16 ? 16 : int($number)
Update: but see int for the implications of this construct. Basically, you should probably use POSIX::floor instead of int().
updated see reply below
In reply to Re: Round Down Routine
by Joost
in thread Round Down Routine
by neo1491
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |