Investment Studio > Expressions > Functions > Math & Trig > MROUND

float mround(float number, float multiple)

Returns the number rounded to the multiple. Rounding is away from zero if the remainder of dividing number by multiple is greater than half the multiple.

Examples

=mround(10, 3)

equals 9

=mround(-11, -3)

equals -12

=mround(1.3, 0.2)

equals 1.2

=mround(1.31, 0.2)

equals 1.4

=mround(5, -2)

equals 6.

See also ceiling, even, floor, frac, int, odd, round, rounddown, roundup, trunc.