math module · Scalar Function

math::round

Round to the nearest integer or decimal place.

Syntax

RQL

Parameters

NameTypeDescription
valueNumberThe number to round
decimal_placesIntegerNumber of decimal places to round to (optional)

Return Value

Returns the number rounded to the specified number of decimal places. If decimal_places is omitted, rounds to the nearest integer.

Examples

Round to 2 decimal places

$ Round to 2 decimal places
$ ctrl+enter to run

Round to nearest integer

$ Round to nearest integer
$ ctrl+enter to run

Related Functions