Ruby 1.9.0 リファレンスマニュアル > ライブラリ一覧 > library complex > class Numeric > imag

instance method Numeric#imag

image -> Fixnum [added by complex]
imag -> Fixnum [added by complex]

複素数として見た場合の虚部を返します。 つまり、self が実数の場合は 0 を返します。