527件ヒット
[201-300件を表示]
(0.055秒)
種類
- インスタンスメソッド (483)
- 特異メソッド (33)
- 定数 (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
# >=(other) -> bool (103.0) -
@undef
@undef -
Complex
# abs -> Numeric (103.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
# abs2 -> Numeric (103.0) -
自身の絶対値の 2 乗を返します。
...自身の絶対値の 2 乗を返します。
以下の計算の結果を返します。
self.real ** 2 + self.imag ** 2
//emlist[例][ruby]{
Complex(1, 1).abs2 # => 2
Complex(1.0, 1.0).abs2 # => 2.0
Complex('1/2', '1/2').abs2 # => (1/2)
//}
@see Complex#abs... -
Complex
# between?(min , max) -> bool (103.0) -
@undef
@undef -
Complex
# clamp(range) -> object (103.0) -
@undef
@undef -
Complex
# coerce(other) -> [Complex , Complex] (103.0) -
other を Complex に変換して [変換後の other, self] の配列を返します。
...other を Complex に変換して [変換後の other, self] の配列を返します。
@raise TypeError 変換できないオブジェクトを指定した場合に発生します。
//emlist[例][ruby]{
Complex(1).coerce(2) # => [(2+0i), (1+0i)]
//}... -
Complex
# fdiv(other) -> Complex (103.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 (103.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 (103.0) -
自身の虚部を返します。
...自身の虚部を返します。
//emlist[例][ruby]{
Complex(3, 2).imag # => 2
//}
@see Numeric#imag... -
Complex
# imaginary -> Numeric (103.0) -
自身の虚部を返します。
...自身の虚部を返します。
//emlist[例][ruby]{
Complex(3, 2).imag # => 2
//}
@see Numeric#imag... -
Complex
# infinite? -> nil | 1 (103.0) -
実部と虚部のどちらも無限大ではない場合に nil を、そうでない場合に 1 を返します。
...実部と虚部のどちらも無限大ではない場合に nil を、そうでない場合に 1 を返します。
//emlist[例][ruby]{
(1+1i).infinite? # => nil
(Float::INFINITY + 1i).infinite? # => 1
//}
@see Complex#finite?...