るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.108秒)

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

検索結果

BigDecimal#floor -> Integer (27351.0)

self 以下の最大整数を返します。

...self 以下の最大整数を返します。

@param n 小数点以下の桁数を整数で指定します。

//emlist[][ruby]{
r
equire "bigdecimal"
B
igDecimal("1.23456").floor # => 1
B
igDecimal("-1.23456").floor # => -2
//}

以下のように引数 n を与えることもできます。
n >=...
...にします)。
n が負のときは小数点以上 n 桁目を操作します
(小数点位置から左に少なくとも n 個の 0 が並びます)。

//emlist[][ruby]{
r
equire "bigdecimal"
B
igDecimal("1.23456").floor(4).to_f # => 1.2345
B
igDecimal("15.23456").floor(-1).to_f # => 10.0
//}...

BigDecimal#floor(n) -> BigDecimal (27351.0)

self 以下の最大整数を返します。

...self 以下の最大整数を返します。

@param n 小数点以下の桁数を整数で指定します。

//emlist[][ruby]{
r
equire "bigdecimal"
B
igDecimal("1.23456").floor # => 1
B
igDecimal("-1.23456").floor # => -2
//}

以下のように引数 n を与えることもできます。
n >=...
...にします)。
n が負のときは小数点以上 n 桁目を操作します
(小数点位置から左に少なくとも n 個の 0 が並びます)。

//emlist[][ruby]{
r
equire "bigdecimal"
B
igDecimal("1.23456").floor(4).to_f # => 1.2345
B
igDecimal("15.23456").floor(-1).to_f # => 10.0
//}...