るりまサーチ

最速Rubyリファレンスマニュアル検索!
115件ヒット [101-115件を表示] (0.012秒)
トップページ > クラス:Complex[x] > クエリ:float[x] > 種類:インスタンスメソッド[x]

別のキーワード

  1. _builtin float
  2. float to_d
  3. json float
  4. float rationalize
  5. fiddle type_float

ライブラリ

キーワード

検索結果

<< < 1 2 >>

Complex#infinite? -> nil | 1 (8.0)

実部と虚部のどちらも無限大ではない場合に nil を、そうでない場合に 1 を返します。

...実部と虚部のどちらも無限大ではない場合に nil を、そうでない場合に 1 を返します。

//emlist[例][ruby]{
(1+1i).infinite? # => nil
(Float::INFINITY + 1i).infinite? # => 1
//}

@see Complex#finite?...

Complex#magnitude -> Numeric (8.0)

自身の絶対値を返します。

...す。

以下の計算の結果を Float オブジェクトで返します。

sqrt(self.real ** 2 + self.imag ** 2)

//emlist[例][ruby]{
Complex
(1, 2).abs # => 2.23606797749979
Complex
(3, 4).abs # => 5.0
Complex
('1/2', '1/2').abs # => 0.7071067811865476
//}

@see Complex#abs2...
<< < 1 2 >>