round
1.6.0

round() -> Number

Rounds the number to the nearest integer.

An instance-method version of Math.round.

Examples

Math.round(4.5) //-> 5
(4.5).round()   //-> 5
(4.49).round()  //-> 4
(-4.5).round()  //-> -4