Method: Complex#conjugate

Defined in:
complex.c

#conjObject

Returns the conjugate of self, Complex.rect(self.imag, self.real):

Complex.rect(1, 2).conj # => (1-2i)


1455
1456
1457
1458
1459
1460
# File 'complex.c', line 1455

VALUE
rb_complex_conjugate(VALUE self)
{
    get_dat1(self);
    return f_complex_new2(CLASS_OF(self), dat->real, f_negate(dat->imag));
}