Ruby 1.8.7 Reference Manual > All Libraries > library complex > class Complex > conj

instance method Complex#conj

conj -> Complex
conjugate -> Complex

自分の共役複素数を返します。

例:

z = Complex.new(1, 1)
p z.conjugate   #=> Complex(1, -1)