public static double Phase(Complex a) { double phase = 2 * Math.Atan((Math.Sqrt(a.Real * a.Real + a.Im * a.Im) - a.Real) / a.Im); return(phase); }
public static double Magnitude(Complex a) { double mag = Math.Sqrt(Math.Pow(a.Real, 2) + Math.Pow(a.Im, 2)); return(mag); }