527件ヒット
[201-300件を表示]
(0.037秒)
種類
- インスタンスメソッド (483)
- 特異メソッド (33)
- 定数 (11)
キーワード
- * (11)
- ** (11)
- + (11)
- - (11)
- -@ (11)
-
/ (11) - < (11)
- <= (11)
- <=> (5)
- == (11)
- > (11)
- >= (11)
- I (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 (22)
- quo (11)
- rationalize (22)
- real (11)
- real? (11)
- rect (22)
- rectangular (22)
-
to
_ c (11) -
to
_ f (11) -
to
_ i (11) -
to
_ r (11) -
to
_ s (11)
検索結果
先頭5件
-
Complex
# coerce(other) -> [Complex , Complex] (3.0) -
other を Complex に変換して [変換後の other, self] の配列を返します。
...other を Complex に変換して [変換後の other, self] の配列を返します。
@raise TypeError 変換できないオブジェクトを指定した場合に発生します。
//emlist[例][ruby]{
Complex(1).coerce(2) # => [(2+0i), (1+0i)]
//}... -
Complex
# conj -> Complex (3.0) -
自身の共役複素数を返します。
...自身の共役複素数を返します。
//emlist[例][ruby]{
Complex(1, 2).conj # => (1-2i)
//}... -
Complex
# conjugate -> Complex (3.0) -
自身の共役複素数を返します。
...自身の共役複素数を返します。
//emlist[例][ruby]{
Complex(1, 2).conj # => (1-2i)
//}... -
Complex
# denominator -> Integer (3.0) -
分母を返します。
...と虚部の分母の最小公倍数を整数で返します。
1 2 3+4i <- numerator(分子)
- + -i -> ----
2 3 6 <- denominator(分母)
//emlist[例][ruby]{
Complex('1/2+2/3i').denominator # => 6
Complex(3).numerator # => 1
//}
@see Complex#numerator... -
Complex
# fdiv(other) -> Complex (3.0) -
self を other で割った商を返します。 実部と虚部が共に Float の値になります。
...elf を other で割った商を返します。
実部と虚部が共に Float の値になります。
@param other 自身を割る数
//emlist[例][ruby]{
Complex(11, 22).fdiv(3) # => (3.6666666666666665+7.333333333333333i)
Complex(11, 22).quo(3) # => ((11/3)+(22/3)*i)
//}
@see Complex#quo... -
Complex
# finite? -> bool (3.0) -
実部と虚部の両方が有限値の場合に true を、そうでない場合に false を返します。
...自身の絶対値が有限値の場合に true を、そうでない場合に false を返します。
//emlist[例][ruby]{
(1 + 1i).finite? # => true
(Float::INFINITY + 1i).finite? # => false
//}
@see Complex#infinite?......実部と虚部の両方が有限値の場合に true を、そうでない場合に false を返します。
//emlist[例][ruby]{
(1 + 1i).finite? # => true
(Float::INFINITY + 1i).finite? # => false
//}
@see Complex#infinite?... -
Complex
# imag -> Numeric (3.0) -
自身の虚部を返します。
...自身の虚部を返します。
//emlist[例][ruby]{
Complex(3, 2).imag # => 2
//}
@see Numeric#imag... -
Complex
# imaginary -> Numeric (3.0) -
自身の虚部を返します。
...自身の虚部を返します。
//emlist[例][ruby]{
Complex(3, 2).imag # => 2
//}
@see Numeric#imag... -
Complex
# infinite? -> nil | 1 (3.0) -
実部と虚部のどちらも無限大ではない場合に nil を、そうでない場合に 1 を返します。
...自身の絶対値が無限大の場合に1を、そうでない場合に nil を返します。
//emlist[例][ruby]{
(1+1i).infinite? # => nil
(Float::INFINITY + 1i).infinite? # => 1
//}
@see Complex#finite?......実部と虚部のどちらも無限大ではない場合に nil を、そうでない場合に 1 を返します。
//emlist[例][ruby]{
(1+1i).infinite? # => nil
(Float::INFINITY + 1i).infinite? # => 1
//}
@see Complex#finite?... -
Complex
# inspect -> String (3.0) -
自身を人間が読みやすい形の文字列表現にして返します。
...。
//emlist[例][ruby]{
Complex(2).inspect # => "(2+0i)"
Complex('-8/6').inspect # => "((-4/3)+0i)"
Complex('1/2i').inspect # => "(0+(1/2)*i)"
Complex(0, Float::INFINITY).inspect # => "(0+Infinity*i)"
Complex(Float::NAN, Float::NAN).insp... -
Complex
# magnitude -> Numeric (3.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...