/
round

round



Function: round()

Rounds a value to a given number of decimal places.

Syntax

round(listOfValues, decimalPlace)

ArgumentTypeDescription
listOfValuesArrayList of values to be assessed
decimalPlaceIntegerDecimal place precision to be used

Examples

round(in.value, 2)

Where in.value contains [12.343,12.345], round() returns [12.34, 12.35]


Whole Numbers

Use the decimalPlace -1 to round to the nearest multiple of 10, and -2 to round to the nearest multiple of 100.


round(187, -1)

returns 190


round(225, -1)

returns 230


round(225, -2)

returns 200

See Also

Related content

roundDown
roundDown
More like this
Analysis Modelling Courses
Analysis Modelling Courses
Read with this
round
round
More like this
Screen Building Courses
Screen Building Courses
Read with this
roundUp
roundUp
More like this
roundUp
roundUp
More like this