種類
- インスタンスメソッド (540)
- 特異メソッド (48)
- 定数 (12)
ライブラリ
- ビルトイン (576)
-
json
/ add / complex (24)
キーワード
- * (12)
- ** (12)
- + (12)
- - (12)
- -@ (12)
-
/ (12) - < (12)
- <= (12)
- <=> (6)
- == (12)
- > (12)
- >= (12)
- I (12)
- abs (12)
- abs2 (12)
- angle (12)
- arg (12)
- between? (12)
- clamp (12)
- coerce (12)
- conj (12)
- conjugate (12)
- denominator (12)
- fdiv (12)
- finite? (9)
- imag (12)
- imaginary (12)
- infinite? (9)
- inspect (12)
-
json
_ create (12) - magnitude (12)
-
marshal
_ dump (12) - numerator (12)
- phase (12)
- polar (24)
- quo (12)
- rationalize (24)
- real (12)
- real? (12)
- rect (24)
- rectangular (24)
-
to
_ c (12) -
to
_ f (12) -
to
_ i (12) -
to
_ json (12) -
to
_ r (12) -
to
_ s (12)
検索結果
先頭5件
-
Complex
# clamp(range) -> object (1.0) -
@undef
@undef -
Complex
# coerce(other) -> [Complex , Complex] (1.0) -
other を Complex に変換して [変換後の other, self] の配列を返します。
...other を Complex に変換して [変換後の other, self] の配列を返します。
@raise TypeError 変換できないオブジェクトを指定した場合に発生します。
//emlist[例][ruby]{
Complex(1).coerce(2) # => [(2+0i), (1+0i)]
//}... -
Complex
# conj -> Complex (1.0) -
自身の共役複素数を返します。
...自身の共役複素数を返します。
//emlist[例][ruby]{
Complex(1, 2).conj # => (1-2i)
//}... -
Complex
# conjugate -> Complex (1.0) -
自身の共役複素数を返します。
...自身の共役複素数を返します。
//emlist[例][ruby]{
Complex(1, 2).conj # => (1-2i)
//}... -
Complex
# denominator -> Integer (1.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 (1.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 (1.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 (1.0) -
自身の虚部を返します。
...自身の虚部を返します。
//emlist[例][ruby]{
Complex(3, 2).imag # => 2
//}
@see Numeric#imag... -
Complex
# imaginary -> Numeric (1.0) -
自身の虚部を返します。
...自身の虚部を返します。
//emlist[例][ruby]{
Complex(3, 2).imag # => 2
//}
@see Numeric#imag...