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

float rounddown(float number, integer digits = 0)

Returns the number rounded toward zero to the specified number of digits.

If digits >= 0, number is rounded to digits decimal places.

If digits < 0, number is rounded digits places left of the decimal point.

If left out, digits defaults to 0.

Examples

=rounddown(1.15, 1)

equals 1.1

=rounddown(1.151, 1)

equals 1.1, too

=rounddown(11.2)

equals 11

=rounddown(11.2, -1)

equals 10 (11.2 rounded down one place left of the decimal point).

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