Top  | Previous | Next

Math / round

round(number, [decimals])

Rounds a floating point number. If the decimals argument is omitted, then the number is rounded to the nearest integer value, and the result will be a long (64-bit integer).

 

If a number of decimal places are specified, the result will be a double (64-bit floating point value), and the result will be rounded to the given number of decimal places.

 

round(3.829839, 2)

... returns 3.83