public static WWComplex Sub(WWComplex a, WWComplex b) { var r = new WWComplex(a); r.Sub(b); return(r); }
public static double AverageDistance(WWComplex[] a, WWComplex[] b) { if (a.Length != b.Length) { throw new ArgumentException("input array length mismatch"); } double d = 0.0; for (int i = 0; i < a.Length; ++i) { var s = WWComplex.Sub(a[i], b[i]); d += s.Magnitude(); } d /= a.Length; return(d); }
public static WWComplex Sub(WWComplex a, WWComplex b) { var r = new WWComplex(a); r.Sub(b); return r; }