Carrot reference
Functions

round()

Rounds a given value to the defined number of decimal places.

Syntax

round(number[, places])

  • number - the Number value to be evaluated.
  • places (optional) - the number of places of the returned Number value.
  • Return type: Number

Sample usage

round(4.5678, 2) returns 4.57.

round(4.5678) returns 5.

Supported data types

Input type

Return type

Logic

Number

Number

If a Number value is passed, that Number value will be rounded to the defined number of decimal places. Defaults to zero decimal places.

Unsupported data types

Null

Unsupported data types return Null.



Updated 04 Oct 2023
Doc contributor
Did this page help you?