round

HC Arithmetic Type Converters round
UInt8 truncate

round num


outputs the nearest integer to the input.

Examples:

round 1.2		;1  ;-)
round -1.2		;-1  ;-)
round 1.9		;2  ;-)
round -1.9		;-2  ;-)
round [1.2 -1.2 1.9 -1.9]		;[1 -1 2 -2] ;-)

Example:

References:

UInt8 truncate