るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.018秒)
トップページ > クラス:Integer[x] > バージョン:2.7.0[x] > クエリ:numeric[x] > クエリ:ceil[x] > 種類:インスタンスメソッド[x]

別のキーワード

  1. numeric step
  2. _builtin numeric
  3. numeric real
  4. numeric fdiv

ライブラリ

検索結果

Integer#ceil(ndigits = 0) -> Integer (54418.0)

self と等しいかより大きな整数のうち最小のものを返します。

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