59件ヒット
[1-59件を表示]
(0.039秒)
種類
- インスタンスメソッド (33)
- 文書 (15)
- 定数 (11)
クラス
- Rational (33)
モジュール
-
Socket
:: Constants (11)
キーワード
-
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
SOPRI
_ BACKGROUND (11) - ceil (11)
- floor (11)
検索結果
先頭5件
-
Rational
# round(precision = 0) -> Integer | Rational (21450.0) -
自身ともっとも近い整数を返します。
...されます。
@param precision 計算結果の精度
@raise TypeError precision に整数以外のものを指定すると発生します。
//emlist[例][ruby]{
Rational(3).round # => 3
Rational(2, 3).round # => 1
Rational(-3, 2).round # => -2
//}
precision を指定した場合は指定......ional を返します。
//emlist[例][ruby]{
Rational('-123.456').round(+1) # => (-247/2)
Rational('-123.456').round(+1).to_f # => -123.5
Rational('-123.456').round(0) # => -123
Rational('-123.456').round(-1) # => -120
Rational('-123.456').round(-2) # => -100
//}
@see Rationa......l#ceil, Rational#floor, Rational#truncate... -
Socket
:: Constants :: SOPRI _ BACKGROUND -> Integer (9201.0) -
@todo Background socket priority
...@todo
Background socket priority... -
Rational
# ceil(precision = 0) -> Integer | Rational (3307.0) -
自身と等しいかより大きな整数のうち最小のものを返します。
...返します。
@param precision 計算結果の精度
@raise TypeError precision に整数以外のものを指定すると発生します。
//emlist[例][ruby]{
Rational(3).ceil # => 3
Rational(2, 3).ceil # => 1
Rational(-3, 2).ceil # => -1
//}
precision を指定した場合は指定......か Rational を返します。
//emlist[例][ruby]{
Rational('-123.456').ceil(+1) # => (-617/5)
Rational('-123.456').ceil(+1).to_f # => -123.4
Rational('-123.456').ceil(0) # => -123
Rational('-123.456').ceil(-1) # => -120
//}
@see Rational#floor, Rational#round, Rational#trunc... -
Rational
# floor(precision = 0) -> Integer | Rational (3307.0) -
自身と等しいかより小さな整数のうち最大のものを返します。
...返します。
@param precision 計算結果の精度
@raise TypeError precision に整数以外のものを指定すると発生します。
//emlist[例][ruby]{
Rational(3).floor # => 3
Rational(2, 3).floor # => 0
Rational(-3, 2).floor # => -2
//}
Rational#to_i とは違う結果を返......by]{
Rational(+7, 4).to_i # => 1
Rational(+7, 4).floor # => 1
Rational(-7, 4).to_i # => -1
Rational(-7, 4).floor # => -2
//}
precision を指定した場合は指定した桁数の数値と、上述の性質に最も近い整
数か Rational を返します。
//emlist[例][ruby]{
Rational('-123.......456').floor(+1) # => (-247/2)
Rational('-123.456').floor(+1).to_f # => -123.5
Rational('-123.456').floor(0) # => -124
Rational('-123.456').floor(-1) # => -130
//}
@see Rational#ceil, Rational#round, Rational#truncate... -
NEWS for Ruby 2
. 4 . 0 (144.0) -
NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...した 12686
* トップレベルで return を書けるようになりました 4840
=== 組み込みクラスの更新
* Array
* Array#concat 12333
複数の引数を取れるようになりました。
* Array#max, Array#min 12172
この変更は小さな非互換の原......追加 9969
* Float
* Float#ceil, Float#floor, Float#truncate は
Float#roundと同じように省略可能な桁を指定する引数を受け付けるようになりました。12245
* Float#round は half というキーワード引数を受け付けるようになりました。......加 12512
* Integer
* Fixnum と Bignum は Integer に統合されました 12005
* Integer#ceil, Integer#floor, Integer#truncate は
Integer#round と同じように省略可能な桁を指定する引数を受け付けるようになりました 12245
* Integer#digits を追... -
NEWS for Ruby 2
. 5 . 0 (84.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...推奨になりました。C拡張のベースクラスでしたが、Rubyレベルに公開するのをやめました。3072
* Exception
* Exception#full_message を追加 14141 [実験的]
例外の文字列表現を取得します。その文字列は捕捉されない例外をRuby......う。 13405
* Integer
* Integer#round, Integer#floor, Integer#ceil, Integer#truncate は常に Integer を返すようになりました
13420
* Integer#pow を追加 12508 11003
* Integer#allbits?, Integer#anybits?, Integer#nobits? を追加 12753
* Integer.sqrt を追加......す 14043
* Range
* Range.new no longer hides exceptions when comparing begin and
end with #<=> and raise a "bad value for range" ArgumentError
but instead lets the exception from the #<=> call go through.
7688
* Regexp
* Onigmo 6.1.3-669ac9997619954c298da971fcfacccf...