Ruby 1.8.7 Reference Manual > All Libraries > library complex > class Numeric > imag

instance method Numeric#imag

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

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