32件ヒット
[1-32件を表示]
(0.016秒)
検索結果
先頭5件
-
Integer
# truncate(ndigits = 0) -> Integer (18132.0) -
0 から self までの整数で、自身にもっとも近い整数を返します。
...定します。
負の整数を指定した場合、小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[][ruby]{
1.truncate # => 1
1.truncate(2) # => 1
18.truncate(-1) #=> 10
(-18).truncate(-1) #=> -10
//}
@see Numeric#truncate... -
Integer
# truncate(ndigits = 0) -> Integer | Float (18132.0) -
0 から self までの整数で、自身にもっとも近い整数を返します。
...指定した場合、Integer を返します。
小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[][ruby]{
1.truncate # => 1
1.truncate(2) # => 1.0
18.truncate(-1) #=> 10
(-18).truncate(-1) #=> -10
//}
@see Numeric#truncate... -
Integer
# truncate -> self (15108.0) -
self を返します。
...self を返します。
例:
10.to_i # => 10
1.floor(2) # => 1.0
1.ceil(2) # => 1.0
1.round(2) # => 1.0
1.truncate(2) # => 1.0... -
Integer
# ceil -> self (8.0) -
self を返します。
...self を返します。
例:
10.to_i # => 10
1.floor(2) # => 1.0
1.ceil(2) # => 1.0
1.round(2) # => 1.0
1.truncate(2) # => 1.0... -
Integer
# floor -> self (8.0) -
self を返します。
...self を返します。
例:
10.to_i # => 10
1.floor(2) # => 1.0
1.ceil(2) # => 1.0
1.round(2) # => 1.0
1.truncate(2) # => 1.0... -
Integer
# round -> self (8.0) -
self を返します。
...self を返します。
例:
10.to_i # => 10
1.floor(2) # => 1.0
1.ceil(2) # => 1.0
1.round(2) # => 1.0
1.truncate(2) # => 1.0... -
Integer
# to _ i -> self (8.0) -
self を返します。
...self を返します。
例:
10.to_i # => 10
1.floor(2) # => 1.0
1.ceil(2) # => 1.0
1.round(2) # => 1.0
1.truncate(2) # => 1.0... -
Integer
# to _ int -> self (8.0) -
self を返します。
...self を返します。
例:
10.to_i # => 10
1.floor(2) # => 1.0
1.ceil(2) # => 1.0
1.round(2) # => 1.0
1.truncate(2) # => 1.0...