Method: Complex#-@

Defined in:
complex.c

#-Object

Returns negation of the value.

-Complex(1, 2)  #=> (-1-2i)
[View source]

766
767
768
769
770
771
772
# File 'complex.c', line 766

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