Skip to content

mround

Round to the nearest multiple of a given value.

v = mround(number, multiple)

Returns number rounded to the nearest multiple of multiple. Sign of both arguments must match.

mround(10, 3) % 9
mround(1.3, 0.2) % 1.4
  • round — Round to the nearest integer (or to a specified number of digits).
  • ceiling — Round up to a multiple of significance.
  • floor — Round toward negative infinity.