るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.020秒)
トップページ > クラス:Complex[x] > ライブラリ:ビルトイン[x] > バージョン:2.4.0[x] > クエリ:coerce[x]

別のキーワード

  1. _builtin coerce
  2. matrix coerce
  3. bigdecimal coerce
  4. bn coerce
  5. uri coerce

検索結果

Complex#coerce(other) -> [Complex, Complex] (54331.0)

other を Complex に変換して [変換後の other, self] の配列を返します。

...other を Complex に変換して [変換後の other, self] の配列を返します。

@raise TypeError 変換できないオブジェクトを指定した場合に発生します。

//emlist[例][ruby]{
Complex
(1).coerce(2) # => [(2+0i), (1+0i)]
//}...