るりまサーチ

最速Rubyリファレンスマニュアル検索!
549件ヒット [101-200件を表示] (0.020秒)
トップページ > クラス:Complex[x] > クエリ:complex[x]

別のキーワード

  1. _builtin complex
  2. complex rect
  3. complex polar
  4. kernel complex
  5. complex rationalize

ライブラリ

キーワード

検索結果

<< < 1 2 3 4 ... > >>

Complex#quo(other) -> Complex (9115.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 (9114.0)

和を計算します。

...和を計算します。

@param other 自身に足す数

//emlist[例][ruby]{
Complex
(1, 2) + Complex(2, 3) # => (3+5i)
//}...

Complex#-(other) -> Complex (9114.0)

差を計算します。

...差を計算します。

@param other 自身から引く数

//emlist[例][ruby]{
Complex
(1, 2) - Complex(2, 3) # => (-1-1i)
//}...

Complex#-@ -> Complex (9114.0)

自身の符号を反転させたものを返します。

...自身の符号を反転させたものを返します。

//emlist[例][ruby]{
-Complex(1) # => (-1+0i)
-Complex(-1, 1) # => (1-1i)
//}...

Complex#conj -> Complex (9109.0)

自身の共役複素数を返します。

...自身の共役複素数を返します。

//emlist[例][ruby]{
Complex
(1, 2).conj # => (1-2i)
//}...

絞り込み条件を変える

Complex#conjugate -> Complex (9109.0)

自身の共役複素数を返します。

...自身の共役複素数を返します。

//emlist[例][ruby]{
Complex
(1, 2).conj # => (1-2i)
//}...

Complex#**(other) -> Complex (9108.0)

冪(べき)乗を計算します。

...冪(べき)乗を計算します。

@param other 自身を other 乗する数

//emlist[例][ruby]{
Complex
('i') ** 2 # => (-1+0i)
//}...

Complex::I -> Complex (9102.0)

虚数単位です。(0+1i) を返します。

虚数単位です。(0+1i) を返します。

Complex#<=>(other) -> -1 | 0 | 1 | nil (9053.0)

self の虚部がゼロで other が実数の場合、 self の実部の <=> メソッドで other と比較した結果を返します。 other が Complex で虚部がゼロの場合も同様です。

... 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#angle -> Float (9049.0)

自身の偏角を[-π,π]の範囲で返します。

...ruby]{
Complex
.polar(3, Math::PI/2).arg # => 1.5707963267948966
//}

非正の実軸付近での挙動に注意してください。以下の例のように虚部が 0.0 と
-0.0 では値が変わります。

//emlist[例][ruby]{
Complex
(-1, 0).arg #=> 3.141592653589793
Complex
(-1, -...
...0).arg #=> 3.141592653589793
Complex
(-1, -0.0).arg #=> -3.141592653589793

Complex
(0, 0.0).arg #=> 0.0
Complex
(0, -0.0).arg #=> -0.0
Complex
(-0.0, 0).arg #=> 3.141592653589793
Complex
(-0.0, -0.0).arg #=> -3.141592653589793
//}


@see...

絞り込み条件を変える

<< < 1 2 3 4 ... > >>