15件ヒット
[1-15件を表示]
(0.024秒)
別のキーワード
ライブラリ
- ビルトイン (15)
検索結果
先頭3件
-
Integer
# ceil(ndigits = 0) -> Integer (18139.0) -
self と等しいかより大きな整数のうち最小のものを返します。
...。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
負の整数を指定した場合、小数点位置から左に少なくとも 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 (18139.0) -
self と等しいかより大きな整数のうち最小のものを返します。
...。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
正の整数を指定した場合、Float を返します。
小数点以下を、最大 n 桁にします。
負の整数を指定した場合、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
# ceildiv(other) -> Integer (6108.0) -
self を other で割り、その(剰余を考えない)商を整数に切り上げたものを返します。 すなわち、self を other で割った商を q とすると、q 以上で最小の整数を返します。
...r で割った商を q とすると、q 以上で最小の整数を返します。
@param other self を割る数を指定します。
//emlist[][ruby]{
3.ceildiv(3) # => 1
4.ceildiv(3) # => 2
5.ceildiv(3) # => 2
3.ceildiv(1.2) # => 3
-5.ceildiv(3) # => -1
-5.ceildiv(-3) # => 2
//}...