You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

round()

Usage

round(val, decimalPlaces)
round(val)

Description
Returns the given value, rounded to the nearest integer. This method tries to convert its parameter objects into numerical values, i.e. you can use strings as arguments. If the optional parameter “decimalPlaces” is given, this method rounds to the given number of decimal places.

Example

${round(5.876543, 2)}

results in

5.88

Search results for "round()"

round()

Returns the given value, rounded to the nearest integer. This method tries to convert its parameter objects into numerical values, i.e. you can use strings as arguments. If the optional parameter decimalPlaces is given, this method rounds to the given number of decimal places.

round(val [, decimalPlaces ])