Round a value to the given precision.
For example:
RoundTo(123.456, 0) = 123RoundTo(123.456, 1) = 120RoundTo(123.456, 2) = 100 Copy
RoundTo(123.456, 0) = 123RoundTo(123.456, 1) = 120RoundTo(123.456, 2) = 100
To round the decimal, i.e. to round to precision, pass in a negative place:
place
RoundTo(123.456789, 0) = 123RoundTo(123.456789, -1) = 123.5RoundTo(123.456789, -2) = 123.46RoundTo(123.456789, -3) = 123.457 Copy
RoundTo(123.456789, 0) = 123RoundTo(123.456789, -1) = 123.5RoundTo(123.456789, -2) = 123.46RoundTo(123.456789, -3) = 123.457
The value to round.
Optional
The place to round to. Positive to round the units, negative to round the decimal. Default 0.
The base to round in. Default is 10 for decimal. Default 10.
Round a value to the given precision.
For example:
To round the decimal, i.e. to round to precision, pass in a negative
place: