예제 #1
0
        public static WWDecimalComplex Add(WWDecimalComplex a, WWDecimalComplex b)
        {
            var r = new WWDecimalComplex(a);

            r.Add(b);
            return(r);
        }
예제 #2
0
        public static WWDecimalComplex[] Add(WWDecimalComplex[] a, WWDecimalComplex[] b)
        {
            if (a.Length != b.Length)
            {
                throw new ArgumentException("input array length mismatch");
            }

            var c = new WWDecimalComplex[a.Length];

            for (int i = 0; i < a.Length; ++i)
            {
                c[i] = WWDecimalComplex.Add(a[i], b[i]);
            }
            return(c);
        }
예제 #3
0
 public static WWDecimalComplex Add(WWDecimalComplex a, WWDecimalComplex b)
 {
     var r = new WWDecimalComplex(a);
     r.Add(b);
     return r;
 }