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

instance method Complex#imag

imag -> Numeric
imaginary -> Numeric

自身の虚部を返します。

例:

Complex(3, 2).imag # => 2
class Complex