public static void sqrt ( Complex_F64 input , Complex_F64 root ) { double r = input . getMagnitude ( ) ; double a = input . real ; root . real = Math . sqrt ( ( r + a ) / 2.0 ) ; root . imaginary = Math . sqrt ( ( r - a ) / 2.0 ) ; if ( input . imaginary < 0 ) root . imaginary = - root . imaginary ; }
Computes the square root of the complex number .