926件ヒット
[1-100件を表示]
(0.083秒)
ライブラリ
- ビルトイン (782)
-
json
/ add / complex (11) - matrix (133)
クラス
モジュール
- Enumerable (22)
キーワード
- * (11)
- ** (11)
- + (11)
- - (11)
- -@ (22)
-
/ (21) - < (11)
- <= (11)
- <=> (5)
- == (11)
- >= (11)
- abs (11)
- abs2 (11)
- angle (22)
- antisymmetric? (6)
- arg (22)
- between? (11)
- clamp (11)
- coerce (11)
- conj (33)
- conjugate (33)
- denominator (22)
- fdiv (50)
- finite? (8)
- i (11)
- imag (33)
- imaginary (33)
- infinite? (16)
- inspect (11)
- magnitude (22)
-
marshal
_ dump (11) - norm (11)
- numerator (22)
- phase (22)
- polar (22)
- quo (22)
- r (11)
- rationalize (22)
- real (33)
- real? (33)
- rect (22)
- rectangular (22)
-
skew
_ symmetric? (6) -
slice
_ before (22) -
to
_ c (44) -
to
_ f (11) -
to
_ i (11) -
to
_ json (11) -
to
_ r (11) -
to
_ s (11) - tr (11)
- trace (11)
検索結果
先頭5件
-
Complex
# >(other) -> bool (27101.0) -
@undef
@undef -
Complex
# <=>(other) -> -1 | 0 | 1 | nil (15153.0) -
self の虚部がゼロで other が実数の場合、 self の実部の <=> メソッドで other と比較した結果を返します。 other が Complex で虚部がゼロの場合も同様です。
...<=> メソッドで other と比較した結果を返します。
other が Complex で虚部がゼロの場合も同様です。
その他の場合は nil を返します。
@param other 自身と比較する数値
//emlist[例][ruby]{
Complex(2, 3) <=> Complex(2, 3) #=> nil
Complex(2, 3) <=>......1 #=> nil
Complex(2) <=> 1 #=> 1
Complex(2) <=> 2 #=> 0
Complex(2) <=> 3 #=> -1
//}... -
Complex
# >=(other) -> bool (15101.0) -
@undef
@undef -
Complex
# coerce(other) -> [Complex , Complex] (9325.0) -
other を Complex に変換して [変換後の other, self] の配列を返します。
...other を Complex に変換して [変換後の other, self] の配列を返します。
@raise TypeError 変換できないオブジェクトを指定した場合に発生します。
//emlist[例][ruby]{
Complex(1).coerce(2) # => [(2+0i), (1+0i)]
//}... -
Complex
# *(other) -> Complex (9226.0) -
積を計算します。
...積を計算します。
@param other 自身に掛ける数
//emlist[例][ruby]{
Complex(1, 2) * 2 # => (2+4i)
Complex(1, 2) * Complex(2, 3) # => (-4+7i)
Complex(1, 2) * Rational(1, 2) # => ((1/2)+(1/1)*i)
//}... -
Complex
# fdiv(other) -> Complex (9220.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
# numerator -> Complex (9220.0) -
分子を返します。
...分子を返します。
//emlist[例][ruby]{
Complex('1/2+2/3i').numerator # => (3+4i)
Complex(3).numerator # => (3+0i)
//}
@see Complex#denominator... -
Complex
# / (other) -> Complex (9215.0) -
商を計算します。
...商を計算します。
@param other 自身を割る数
//emlist[例][ruby]{
Complex(10.0) / 3 # => (3.3333333333333335+(0/1)*i)
Complex(10) / 3 # => ((10/3)+(0/1)*i)
//}
@see Numeric#quo... -
Complex
# quo(other) -> Complex (9215.0) -
商を計算します。
...商を計算します。
@param other 自身を割る数
//emlist[例][ruby]{
Complex(10.0) / 3 # => (3.3333333333333335+(0/1)*i)
Complex(10) / 3 # => ((10/3)+(0/1)*i)
//}
@see Numeric#quo... -
Complex
# +(other) -> Complex (9214.0) -
和を計算します。
...和を計算します。
@param other 自身に足す数
//emlist[例][ruby]{
Complex(1, 2) + Complex(2, 3) # => (3+5i)
//}...