Ruby 2.0.0 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > Complexクラス > *

instance method Complex#*

self * other -> Complex[permalink][rdoc]

積を計算します。

[PARAM] other:
自身に掛ける数

例:

Complex(1, 2) * 2              # => (2+4i)
Complex(1, 2) * Complex(2, 3)  # => (-4+4i)
Complex(1, 2) * Rational(1, 2) # => ((1/2)+(1/1)*i)