#roundTo
Returns a number rounded to the specified number of decimal places.
#roundTo(value, decimals)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
value |
path | number |
The number to round. |
decimals |
integer |
Decimal places to keep. |
Returns
Section titled “Returns”number
Examples
Section titled “Examples”Two decimal places
Section titled “Two decimal places”{ "pi": 3.14159}{ "result": "#roundTo($.pi, 2)"}{ "result": 3.14}