るりまサーチ

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

別のキーワード

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

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

Complex#-(other) -> Complex (27226.0)

差を計算します。

...差を計算します。

@param other 自身から引く数

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

Complex#-@ -> Complex (15232.0)

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

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

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

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.rect(r, i = 0) -> Complex (9243.0)

実部が r、虚部が i である Complex クラスのオブジェクトを生成します。

...ある Complex クラスのオブジェクトを生成します。

@param r 生成する複素数の実部。

@param i 生成する複素数の虚部。省略した場合は 0 です。

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

@see Kernel.#Complex...

Complex.rectangular(r, i = 0) -> Complex (9243.0)

実部が r、虚部が i である Complex クラスのオブジェクトを生成します。

...ある Complex クラスのオブジェクトを生成します。

@param r 生成する複素数の実部。

@param i 生成する複素数の虚部。省略した場合は 0 です。

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

@see Kernel.#Complex...

絞り込み条件を変える

Complex.polar(r, theta = 0) -> Complex (9242.0)

絶対値が r、偏角が theta である Complex クラスのオブジェクトを生成します。

... Complex クラスのオブジェクトを生成します。

@param r 生成する複素数の絶対値。

@param theta 生成する複素数の偏角。単位はラジアンです。省略した場合は 0 です。

//emlist[例][ruby]{
Complex
.polar(2.0) # => (2.0+0.0i)
Complex
.po...
...lar(2.0, 0) # => (2.0+0.0i)
Complex
.polar(2.0, Math::PI) # => (-2.0+2.4492127076447545e-16i)
//}...

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.json_create(hash) -> Complex (9218.0)

JSON のオブジェクトから Complex のオブジェクトを生成して返します。

...JSON のオブジェクトから Complex のオブジェクトを生成して返します。

@param hash 実部をキー 'r'、虚部をキー 'i' に持つハッシュを指定します。...

絞り込み条件を変える

<< 1 2 3 ... > >>