428件ヒット
[101-200件を表示]
(0.092秒)
種類
- インスタンスメソッド (373)
- 特異メソッド (44)
- 定数 (11)
ライブラリ
- ビルトイン (406)
-
json
/ add / complex (22)
キーワード
- * (11)
- ** (11)
- + (11)
- -@ (11)
-
/ (11) - <=> (5)
- abs (11)
- abs2 (11)
- between? (11)
- coerce (11)
- conj (11)
- conjugate (11)
- denominator (11)
- fdiv (11)
- finite? (8)
- imag (11)
- imaginary (11)
- infinite? (8)
- inspect (11)
-
json
_ create (11) - magnitude (11)
- numerator (11)
- polar (22)
- quo (11)
- rationalize (22)
- real (11)
- real? (11)
- rect (22)
- rectangular (22)
-
to
_ c (11) -
to
_ i (11) -
to
_ json (11) -
to
_ r (11) -
to
_ s (11)
検索結果
先頭5件
-
Complex
# finite? -> bool (6213.0) -
実部と虚部の両方が有限値の場合に true を、そうでない場合に false を返します。
...実部と虚部の両方が有限値の場合に true を、そうでない場合に false を返します。
//emlist[例][ruby]{
(1 + 1i).finite? # => true
(Float::INFINITY + 1i).finite? # => false
//}
@see Complex#infinite?... -
Complex
# imag -> Numeric (6201.0) -
自身の虚部を返します。
...自身の虚部を返します。
//emlist[例][ruby]{
Complex(3, 2).imag # => 2
//}
@see Numeric#imag... -
Complex
# imaginary -> Numeric (6201.0) -
自身の虚部を返します。
...自身の虚部を返します。
//emlist[例][ruby]{
Complex(3, 2).imag # => 2
//}
@see Numeric#imag... -
Complex
# -@ -> Complex (6131.0) -
自身の符号を反転させたものを返します。
...自身の符号を反転させたものを返します。
//emlist[例][ruby]{
-Complex(1) # => (-1+0i)
-Complex(-1, 1) # => (1-1i)
//}... -
Complex
# magnitude -> Numeric (3201.0) -
自身の絶対値を返します。
...す。
以下の計算の結果を Float オブジェクトで返します。
sqrt(self.real ** 2 + self.imag ** 2)
//emlist[例][ruby]{
Complex(1, 2).abs # => 2.23606797749979
Complex(3, 4).abs # => 5.0
Complex('1/2', '1/2').abs # => 0.7071067811865476
//}
@see Complex#abs2... -
Complex
# to _ r -> Rational (3201.0) -
自身を Rational に変換します。
...自身を Rational に変換します。
@param eps 許容する誤差。常に無視されます。
@raise RangeError 虚部が実数か、0 ではない場合に発生します。
//emlist[例][ruby]{
Complex(3).to_r # => (3/1)
Complex(3, 2).to_r # => RangeError
//}... -
Complex
# polar -> [Numeric , Numeric] (301.0) -
自身の絶対値と偏角を配列にして返します。
...自身の絶対値と偏角を配列にして返します。
//emlist[例][ruby]{
Complex.polar(1, 2).polar # => [1, 2]
//}
@see Numeric#polar... -
Complex
# rect -> [Numeric , Numeric] (301.0) -
実部と虚部を配列にして返します。
...実部と虚部を配列にして返します。
//emlist[例][ruby]{
Complex(3).rect # => [3, 0]
Complex(3.5).rect # => [3.5, 0]
Complex(3, 2).rect # => [3, 2]
//}
@see Numeric#rect... -
Complex
# rectangular -> [Numeric , Numeric] (301.0) -
実部と虚部を配列にして返します。
...実部と虚部を配列にして返します。
//emlist[例][ruby]{
Complex(3).rect # => [3, 0]
Complex(3.5).rect # => [3.5, 0]
Complex(3, 2).rect # => [3, 2]
//}
@see Numeric#rect... -
Complex
# to _ s -> String (253.0) -
自身を "実部 + 虚部i" 形式の文字列にして返します。
...虚部i" 形式の文字列にして返します。
//emlist[例][ruby]{
Complex(2).to_s # => "2+0i"
Complex('-8/6').to_s # => "-4/3+0i"
Complex('1/2i').to_s # => "0+1/2i"
Complex(0, Float::INFINITY).to_s # => "0+Infinity*i"
Complex(Float......::NAN, Float::NAN).to_s # => "NaN+NaN*i"
//}...