5件ヒット
[1-5件を表示]
(0.073秒)
検索結果
先頭5件
-
Numeric
# polar -> [Numeric , Numeric] (54397.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
# polar -> [Numeric , Numeric] (54361.0) -
自身の絶対値と偏角を配列にして返します。
自身の絶対値と偏角を配列にして返します。
//emlist[例][ruby]{
Complex.polar(1, 2).polar # => [1, 2]
//}
@see Numeric#polar -
Complex
# angle -> Float (22.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 (22.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 (22.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...