るりまサーチ

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

別のキーワード

  1. numeric step
  2. _builtin numeric
  3. numeric angle
  4. numeric polar
  5. numeric conjugate

ライブラリ

クラス

キーワード

検索結果

Complex#angle -> Float (18113.0)

自身の偏角を[-π,π]の範囲で返します。

...自身の偏角を[-π,π]の範囲で返します。

//emlist[例][ruby]{
Complex.polar(3, Math::PI/2).arg # => 1.5707963267948966
//}

非正の実軸付近での挙動に注意してください。以下の例のように虚部が 0.0 と
-0.0 では値が変わります。

//emlist[例][ruby]...
...#=> 3.141592653589793
Complex(-1, -0.0).arg #=> -3.141592653589793

Complex(0, 0.0).arg #=> 0.0
Complex(0, -0.0).arg #=> -0.0
Complex(-0.0, 0).arg #=> 3.141592653589793
Complex(-0.0, -0.0).arg #=> -3.141592653589793
//}


@see Numeric#arg...

Numeric (6202.0)

数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。

...スです。Integer や Float などの数値クラス
Numeric のサブクラスとして実装されています。

演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッドは、サブクラスで...
...o o - o
abs2 | o - - - - - o
angle
| o - - - o - o
arg | o - -...
...- o - o
polar
| o - - - - - o
pred | - o - - - - -
Numeric
Integer Fixnum Bignum...
...abs | o o o o o
abs2 | o - - - o
angle
| o - o - o
arg | o - o - o...
...- -
Numeric
Integer Float Rational Complex
--------------------------------------------------------------------------------
phase | o - o - o
polar
| o...

Complex#arg -> Float (3013.0)

自身の偏角を[-π,π]の範囲で返します。

...自身の偏角を[-π,π]の範囲で返します。

//emlist[例][ruby]{
Complex.polar(3, Math::PI/2).arg # => 1.5707963267948966
//}

非正の実軸付近での挙動に注意してください。以下の例のように虚部が 0.0 と
-0.0 では値が変わります。

//emlist[例][ruby]...
...#=> 3.141592653589793
Complex(-1, -0.0).arg #=> -3.141592653589793

Complex(0, 0.0).arg #=> 0.0
Complex(0, -0.0).arg #=> -0.0
Complex(-0.0, 0).arg #=> 3.141592653589793
Complex(-0.0, -0.0).arg #=> -3.141592653589793
//}


@see Numeric#arg...

Complex#phase -> Float (3013.0)

自身の偏角を[-π,π]の範囲で返します。

...自身の偏角を[-π,π]の範囲で返します。

//emlist[例][ruby]{
Complex.polar(3, Math::PI/2).arg # => 1.5707963267948966
//}

非正の実軸付近での挙動に注意してください。以下の例のように虚部が 0.0 と
-0.0 では値が変わります。

//emlist[例][ruby]...
...#=> 3.141592653589793
Complex(-1, -0.0).arg #=> -3.141592653589793

Complex(0, 0.0).arg #=> 0.0
Complex(0, -0.0).arg #=> -0.0
Complex(-0.0, 0).arg #=> 3.141592653589793
Complex(-0.0, -0.0).arg #=> -3.141592653589793
//}


@see Numeric#arg...