1件ヒット
[1-1件を表示]
(0.273秒)
検索結果
-
Float
# round(ndigits = 0) -> Integer | Float (24028.0) -
自身ともっとも近い整数もしくは実数を返します。
...3.141592653589793
t.round(3) # => 3.142
t.round(0) # => 3
t.round(1) # => 3.1
t = t**10 # => 93648.04747608298
t.round(-0) # => 93648
t.round(-1) # => 93650
t.round(-2) # => 93600
t.round(-3) # => 94000
t.round(-100) # => 0
//}
@see Float#ceil, Float#floor, Float#truncate...