るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. erb u
  2. util u
  3. matrix u
  4. encoding koi8_u
  5. _builtin koi8_u

ライブラリ

キーワード

検索結果

Complex#marshal_dump -> Array (18307.0)

Marshal.#load のためのメソッドです。 Complex::compatible#marshal_load で復元可能な配列を返します。

...al.#load のためのメソッドです。
Complex
::compatible#marshal_load で復元可能な配列を返します。

2.0 以降では Marshal.#load で 1.8 系の Complex オブジェクト
を保存した文字列も復元できます。

[注意] Complex::compatible は通常の方法では参...

Complex#numerator -> Complex (18307.0)

分子を返します。

...分子を返します。

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

@see Complex#denominator...

Complex#conjugate -> Complex (9307.0)

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

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

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

Complex#magnitude -> Numeric (9307.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#quo(other) -> Complex (9307.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#rectangular -> [Numeric, Numeric] (9307.0)

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

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

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

@see Numeric#rect...

Complex#polar -> [Numeric, Numeric] (607.0)

自身の絶対値と偏角を配列にして返します。

...自身の絶対値と偏角を配列にして返します。

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

@see Numeric#polar...

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

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

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

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

@see Numeric#rect...

Complex#abs -> Numeric (307.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 (307.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#imag -> Numeric (307.0)

自身の虚部を返します。

...自身の虚部を返します。

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

@see Numeric#imag...

Complex#imaginary -> Numeric (307.0)

自身の虚部を返します。

...自身の虚部を返します。

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

@see Numeric#imag...

Complex#real -> Numeric (307.0)

自身の実部を返します。

...自身の実部を返します。

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