public void div ( Complex c ) { double modulus = c . real * c . real + c . imag * c . imag ; double newreal = imag * c . imag + real * c . real ; double newimag = imag * c . real - real * c . imag ; real = newreal / modulus ; imag = newimag / modulus ; }
Div this value by a complex value