public static CComplex Conjugate(CComplex c)
 {
     return new CComplex(c._r, -c._i);
 }
    public static CComplex Multiply(CComplex c1, CComplex c2)
    {
        #if PREFER_ADDITION
        // float a = c1._r;
        // float b = c1._i;
        // float c = c2._r;
        // float d = c2._i;
        // float k1 = a * (c + d);
        // float k2 = d * (a + b);
        // float k3 = c * (b - a);

        float k1 = c1._r * (c2._r + c2._i);
        float k2 = c2._i * (c1._r + c1._i);
        float k3 = c2._r * (c1._i - c1._r);

        return new CComplex(k1 - k2, k1 + k3);
        #else
        // float a = c1._r;
        // float b = c1._i;
        // float c = c2._r;
        // float d = c2._i;
        // return new CComplex(a * c - b * d, b * c + a * d);

        return new CComplex(c1._r * c2._r - c1._i * c2._i, c1._i * c2._r + c1._r * c2._i);
        #endif
    }
 public static CComplex Add(CComplex c1, CComplex c2)
 {
     return new CComplex(c1._r + c2._r, c1._i + c2._i);
 }
 public static CComplex Add(CComplex c, float d)
 {
     return new CComplex(c._r + d, c._i);
 }
 public static CComplex Subtract(CComplex c, float d)
 {
     return new CComplex(c._r - d, c._i);
 }
 public static CComplex Subtract(CComplex c1, CComplex c2)
 {
     return new CComplex(c1._r - c2._r, c1._i - c2._i);
 }
 public static CComplex Negate(CComplex c)
 {
     return new CComplex(-c._r, -c._i);
 }
 public static CComplex Multiply(CComplex c, float d)
 {
     return new CComplex(c._r * d, c._i * d);
 }
 public PComplex(CComplex c)
 {
     _m = (float)Math.Sqrt(c._r * c._r + c._i * c._i);
     _a = (float)Math.Atan2(c._i, c._r);
 }