Name: round
Category: Arithmetic
Description:
round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.
Syntax:
round(x)
round(x, n)
round(unit, valuelessUnit)
round(unit, n, valuelessUnit)
Examples:
round(3.2)
3
round(3.8)
4
round(-4.2)
-4
round(-4.8)
-5
round(pi, 3)
3.142
round(123.45678, 2)
123.46
round(3.241cm, 2, cm)
3.24 cm
round([3.2, 3.8, -4.7])
[3, 4, -5]
See also: ceil, floor, fix