るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
4件ヒット [1-4件を表示] (0.026秒)
トップページ > クラス:Complex[x] > クエリ:Numeric#polar[x] > バージョン:2.5.0[x]

別のキーワード

  1. numeric step
  2. _builtin numeric
  3. numeric polar
  4. numeric arg
  5. numeric conj

ライブラリ

キーワード

検索結果

Complex#polar -> [Numeric, Numeric] (55003.0)

自身の絶対値と偏角を配列にして返します。

...自身の絶対値と偏角を配列にして返します。

//emlist[例][ruby]{
Complex
.polar(1, 2).polar # => [1, 2]
//}

@see Numeric#polar...

Complex#angle -> Float (40.0)

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

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

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

//emlist[例][ruby]{
Complex
(-1, 0).arg #=> 3.141592653589793
Complex
(-1, -...
...0).arg #=> 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...

Complex#arg -> Float (40.0)

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

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

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

//emlist[例][ruby]{
Complex
(-1, 0).arg #=> 3.141592653589793
Complex
(-1, -...
...0).arg #=> 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...

Complex#phase -> Float (40.0)

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

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

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

//emlist[例][ruby]{
Complex
(-1, 0).arg #=> 3.141592653589793
Complex
(-1, -...
...0).arg #=> 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...