るりまサーチ

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

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

検索結果

Integer#floor(ndigits = 0) -> Integer (26135.0)

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

...整数で指定します。
負の整数を指定した場合、小数点位置から左に少なくとも n 個の 0 が並びます。

//emlist[][ruby]{
1.floor # => 1
1.floor(2) # => 1
18.floor(-1) # => 10
(-18).floor(-1) # => -20
//}

@see Numeric#floor...

Integer#floor(ndigits = 0) -> Integer | Float (26135.0)

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

...負の整数を指定した場合、Integer を返します。
小数点位置から左に少なくとも n 個の 0 が並びます。

//emlist[][ruby]{
1.floor # => 1
1.floor(2) # => 1.0
18.floor(-1) # => 10
(-18).floor(-1) # => -20
//}

@see Numeric#floor...