in reply to Re: Best way to make sure a number is an even multiple of another?
in thread Best way to make sure a number is an even multiple of another?

The trick is that what the OP wanted was greater than or equal to, without doing an if (or equivalent). Here's one way to modify your suggestion:
$m*(($n%$m > 0) + int($n/$m));

Caution: Contents may have been coded under pressure.
  • Comment on Re^2: Best way to make sure a number is an even multiple of another?
  • Download Code