るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle type_size_t

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 > >>

Complex.rectangular(r, i = 0) -> Complex (21207.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] (21201.0)

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

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

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

@see Numeric#rect...

Matrix#rectangular -> [Matrix, Matrix] (21201.0)

行列を実部と虚部に分解したものを返します。

...行列を実部と虚部に分解したものを返します。


//emlist[例][ruby]{
m.rect == [m.real, m.imag] # ==> true for all matrices m
//}

@see Matrix#imaginary, Matrix#real...

Numeric#rectangular -> [Numeric, Numeric] (21201.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 (6107.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#rect -> [Numeric, Numeric] (6101.0)

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

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

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

@see Numeric#rect...

Matrix#rect -> [Matrix, Matrix] (6101.0)

行列を実部と虚部に分解したものを返します。

...行列を実部と虚部に分解したものを返します。


//emlist[例][ruby]{
m.rect == [m.real, m.imag] # ==> true for all matrices m
//}

@see Matrix#imaginary, Matrix#real...

Numeric#rect -> [Numeric, Numeric] (6101.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...

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

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

...字列。

@param exception false を指定すると、変換できなかった場合、
例外を発生する代わりに nil を返します。

@raise ArgumentError 変換できないオブジェクトを指定した場合に発生します。

//emlist[例][ruby]{
Complex(1)...
....440211108893697i)
Complex('_') # => ArgumentError
//}

r にも i にも複素数と解釈されるオブジェクトを指定した場合には、
Complex(a, b) を a+bi として計算した 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 系では廃止されました。...
<< 1 2 > >>