round(ndigits = 0, half: :up) -> Integer | Float[permalink][rdoc]self ともっとも近い整数を返します。
1.round         # => 1
1.round(2)      # => 1.0
15.round(-1)    # => 20
(-15).round(-1) #=> -20
25.round(-1, half: :up)      # => 30
25.round(-1, half: :down)    # => 20
25.round(-1, half: :even)    # => 20
35.round(-1, half: :up)      # => 40
35.round(-1, half: :down)    # => 30
35.round(-1, half: :even)    # => 40
(-25).round(-1, half: :up)   # => -30
(-25).round(-1, half: :down) # => -20
(-25).round(-1, half: :even) # => -20
[SEE_ALSO] Numeric#round