4件ヒット
[1-4件を表示]
(0.112秒)
検索結果
先頭4件
-
Numeric
# polar -> [Numeric , Numeric] (54445.0) -
自身の絶対値と偏角を配列にして返します。正の数なら [self, 0]、負の数な ら [-self, Math::PI] を返します。
...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 のサブクラスは、このメソッドを適切に再定義しなければなりません。... -
Complex
# angle -> Float (40.0) -
自身の偏角を[-π,π]の範囲で返します。
...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 Numeric#arg... -
Complex
# arg -> Float (40.0) -
自身の偏角を[-π,π]の範囲で返します。
...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 Numeric#arg... -
Complex
# phase -> Float (40.0) -
自身の偏角を[-π,π]の範囲で返します。
...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 Numeric#arg...