206件ヒット
[201-206件を表示]
(0.024秒)
検索結果
-
Rational
# round(precision = 0) -> Integer | Rational (9.0) -
自身ともっとも近い整数を返します。
...y]{
Rational('-123.456').round(+1) # => (-247/2)
Rational('-123.456').round(+1).to_f # => -123.5
Rational('-123.456').round(0) # => -123
Rational('-123.456').round(-1) # => -120
Rational('-123.456').round(-2) # => -100
//}
@see Rational#ceil, Rational#floor, Rational#truncate...