るりまサーチ

最速Rubyリファレンスマニュアル検索!
99件ヒット [1-99件を表示] (0.030秒)

別のキーワード

  1. _builtin rectangular
  2. matrix rectangular
  3. complex rectangular
  4. numeric rectangular

クラス

モジュール

キーワード

検索結果

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

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

...成します。

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

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

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

@see Kernel.#Complex...

Complex#rectangular -> [Numeric, Numeric] (15103.0)

実部と虚部を配列にして返します。

実部と虚部を配列にして返します。

//emlist[例][ruby]{
Complex(3).rect # => [3, 0]
Complex(3.5).rect # => [3.5, 0]
Complex(3, 2).rect # => [3, 2]
//}

@see Numeric#rect

Numeric#rectangular -> [Numeric, Numeric] (15103.0)

[self, 0] を返します。

[self, 0] を返します。

//emlist[例][ruby]{
1.rect # => [1, 0]
-1.rect # => [-1, 0]
1.0.rect # => [1.0, 0]
-1.0.rect # => [-1.0, 0]
//}

Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。

@see Complex#rect

Complex.rect(r, i = 0) -> Complex (9.0)

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

...成します。

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

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

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

@see Kernel.#Complex...

Kernel.#Complex(r, i = 0) -> Complex (8.0)

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

...ェクトを返しま
す。

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

@see Complex.rect、Complex.rectangular

[注意] Complex.new、Complex.new! は 1.9 系では廃止されました。...

絞り込み条件を変える

Kernel.#Complex(r, i = 0, exception: true) -> Complex | nil (8.0)

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

...ェクトを返しま
す。

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

@see Complex.rect、Complex.rectangular

[注意] Complex.new、Complex.new! は 1.9 系では廃止されました。...

Kernel.#Complex(s) -> Complex (8.0)

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

...ェクトを返しま
す。

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

@see Complex.rect、Complex.rectangular

[注意] Complex.new、Complex.new! は 1.9 系では廃止されました。...

Kernel.#Complex(s, exception: true) -> Complex | nil (8.0)

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

...ェクトを返しま
す。

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

@see Complex.rect、Complex.rectangular

[注意] Complex.new、Complex.new! は 1.9 系では廃止されました。...

Numeric (8.0)

数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。

...- - - o
rect | o - - - - - o
rectangular
| o - - - - - o
remainder | o - -...
...Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
rectangular
| o - - - o
remainder | o o - - -...

Complex#rect -> [Numeric, Numeric] (3.0)

実部と虚部を配列にして返します。

実部と虚部を配列にして返します。

//emlist[例][ruby]{
Complex(3).rect # => [3, 0]
Complex(3.5).rect # => [3.5, 0]
Complex(3, 2).rect # => [3, 2]
//}

@see Numeric#rect

絞り込み条件を変える

Numeric#rect -> [Numeric, Numeric] (3.0)

[self, 0] を返します。

[self, 0] を返します。

//emlist[例][ruby]{
1.rect # => [1, 0]
-1.rect # => [-1, 0]
1.0.rect # => [1.0, 0]
-1.0.rect # => [-1.0, 0]
//}

Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。

@see Complex#rect