24件ヒット
[1-24件を表示]
(0.012秒)
検索結果
先頭5件
-
Integer
# ceil(ndigits = 0) -> Integer (18134.0) -
self と等しいかより大きな整数のうち最小のものを返します。
...数を整数で指定します。
負の整数を指定した場合、小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[][ruby]{
1.ceil # => 1
1.ceil(2) # => 1
18.ceil(-1) # => 20
(-18).ceil(-1) # => -10
//}
@see Numeric#ceil... -
Integer
# ceil(ndigits = 0) -> Integer | Float (18134.0) -
self と等しいかより大きな整数のうち最小のものを返します。
...負の整数を指定した場合、Integer を返します。
小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[][ruby]{
1.ceil # => 1
1.ceil(2) # => 1.0
18.ceil(-1) # => 20
(-18).ceil(-1) # => -10
//}
@see Numeric#ceil... -
Integer
# ceil -> self (18110.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 (3010.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 (3010.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 (3010.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 (3010.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
# truncate -> self (3010.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
# bit _ length -> Integer (9.0) -
self を表すのに必要なビット数を返します。
...ま
す。2**n の場合は n+1 になります。self にそのようなビットがない(0 や
-1 である)場合は 0 を返します。
例: ceil(log2(int < 0 ? -int : int+1)) と同じ結果
(-2**12-1).bit_length # => 13
(-2**12).bit_length # => 12
(-2**12+1).bit_length...