24件ヒット [1-24件を表示] （0.011秒）
トップページ > クラス:Complex > > :*

## 検索結果

### Complex#*(other) -> Complex (18121.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#**(other) -> Complex (6103.0)

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

@param other 自身を other 乗する数

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

### Complex#inspect -> String (15.0)

...y]{
Complex
(2).inspect # => "(2+0i)"
Complex
('-8/6').inspect # => "((-4/3)+0i)"
Complex
('1/2i').inspect # => "(0+(1/2)*i)"
Complex
(0, Float::INFINITY).inspect # => "(0+Infinity*i)"
Complex
(Float::NAN, Float::NAN).inspect # => "(NaN+NaN*i)...

### Complex#to_s -> String (15.0)

...

//emlist[例][ruby]{
Complex
(2).to_s # => "2+0i"
Complex
('-8/6').to_s # => "-4/3+0i"
Complex
('1/2i').to_s # => "0+1/2i"
Complex
(0, Float::INFINITY).to_s # => "0+Infinity*i"
Complex
(Float::NAN, Float::NAN).to_s # => "NaN+NaN*i"
//}...