use POSIX qw(ceil); sub fix { my ($n, $m) = @_; ceil($n/$m)*$m; }
In reply to Re: Best way to make sure a number is an even multiple of another?
by itub
in thread Best way to make sure a number is an even multiple of another?
by demerphq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |