round( )
number
round(number x
)
The round( )
function returns the integer closest to x
. For example, round(3.141592)
returns 3. round(-3.141592)
returns -3. If two
integers are equally close to x
, then the one that is closer to
positive infinity is returned. For example, round(3.5)
returns 4, and round(-3.5)
returns -3. Nonnumber types
are converted to numbers as if by the number( )
function, before
rounding.