るりまサーチ

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

別のキーワード

  1. numeric step
  2. _builtin numeric
  3. numeric polar
  4. numeric floor
  5. numeric imag

検索結果

Numeric#polar -> [Numeric, Numeric] (30543.0)

自身の絶対値と偏角を配列にして返します。正の数なら [self, 0]、負の数な ら [-self, Math::PI] を返します。

...数なら [self, 0]、負の数な
ら [-self, Math::PI] を返します。

//emlist[例][ruby]{
1.0.polar # => [1.0, 0]
2.0.polar # => [2.0, 0]
-1.0.polar # => [1.0, 3.141592653589793]
-2.0.polar # => [2.0, 3.141592653589793]
//}

Numeric
のサブクラスは、このメソッドを適切に再...
...定義しなければなりません。

@see Complex#polar...