Add() public static method

Adds two complex numbers.
public static Add ( Complex a, Complex b ) : Complex
a Complex A instance.
b Complex A instance.
return Complex
Esempio n. 1
0
 /// <summary>
 /// Adds a complex number and a scalar value.
 /// </summary>
 ///
 /// <param name="a">A <see cref="Complex"/> instance.</param>
 /// <param name="s">A scalar value.</param>
 ///
 /// <returns>Returns new <see cref="Complex"/> instance containing the sum.</returns>
 ///
 public static Complex operator +(double s, Complex a)
 {
     return(Complex.Add(a, s));
 }
Esempio n. 2
0
 /// <summary>
 /// Adds two complex numbers.
 /// </summary>
 ///
 /// <param name="a">A <see cref="Complex"/> instance.</param>
 /// <param name="b">A <see cref="Complex"/> instance.</param>
 ///
 /// <returns>Returns new <see cref="Complex"/> instance containing the sum.</returns>
 ///
 public static Complex operator +(Complex a, Complex b)
 {
     return(Complex.Add(a, b));
 }