494件ヒット
[1-100件を表示]
(0.149秒)
ライブラリ
- ビルトイン (483)
-
json
/ add / complex (11)
キーワード
- * (11)
- ** (11)
- + (11)
- - (11)
- -@ (11)
-
/ (11) - < (11)
- <= (11)
- <=> (5)
- == (11)
- > (11)
- >= (11)
- abs (11)
- abs2 (11)
- angle (11)
- arg (11)
- between? (11)
- clamp (11)
- coerce (11)
- conj (11)
- conjugate (11)
- denominator (11)
- fdiv (11)
- finite? (8)
- imag (11)
- imaginary (11)
- infinite? (8)
- inspect (11)
- magnitude (11)
-
marshal
_ dump (11) - numerator (11)
- phase (11)
- polar (11)
- quo (11)
- rationalize (22)
- real (11)
- real? (11)
- rect (11)
- rectangular (11)
-
to
_ c (11) -
to
_ f (11) -
to
_ i (11) -
to
_ json (11) -
to
_ r (11) -
to
_ s (11)
検索結果
先頭5件
-
Complex
# angle -> Float (9102.0) -
自身の偏角を[-π,π]の範囲で返します。
...で返します。
//emlist[例][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... -
Complex
# arg -> Float (6102.0) -
自身の偏角を[-π,π]の範囲で返します。
...で返します。
//emlist[例][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... -
Complex
# clamp(range) -> object (6102.0) -
@undef
@undef -
Complex
# marshal _ dump -> Array (6102.0) -
Marshal.#load のためのメソッドです。 Complex::compatible#marshal_load で復元可能な配列を返します。
...Marshal.#load のためのメソッドです。
Complex::compatible#marshal_load で復元可能な配列を返します。
2.0 以降では Marshal.#load で 1.8 系の Complex オブジェクト
を保存した文字列も復元できます。
[注意] Complex::compatible は通常の方法で... -
Complex
# phase -> Float (6102.0) -
自身の偏角を[-π,π]の範囲で返します。
...で返します。
//emlist[例][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... -
Complex
# polar -> [Numeric , Numeric] (6102.0) -
自身の絶対値と偏角を配列にして返します。
...自身の絶対値と偏角を配列にして返します。
//emlist[例][ruby]{
Complex.polar(1, 2).polar # => [1, 2]
//}
@see Numeric#polar... -
Complex
# rationalize -> Rational (6102.0) -
自身を Rational に変換します。
...自身を Rational に変換します。
@param eps 許容する誤差。常に無視されます。
@raise RangeError 虚部が実数か、0 ではない場合に発生します。
//emlist[例][ruby]{
Complex(3).to_r # => (3/1)
Complex(3, 2).to_r # => RangeError
//}... -
Complex
# rationalize(eps) -> Rational (6102.0) -
自身を Rational に変換します。
...自身を Rational に変換します。
@param eps 許容する誤差。常に無視されます。
@raise RangeError 虚部が実数か、0 ではない場合に発生します。
//emlist[例][ruby]{
Complex(3).to_r # => (3/1)
Complex(3, 2).to_r # => RangeError
//}... -
Complex
# real -> Numeric (6102.0) -
自身の実部を返します。
...自身の実部を返します。
//emlist[例][ruby]{
Complex(3, 2).real # => 3
//}... -
Complex
# real? -> false (6102.0) -
常に false を返します。
...常に false を返します。
//emlist[例][ruby]{
(2+3i).real? # => false
(2+0i).real? # => false
//}
@see Numeric#real?...