Exemplo n.º 1
0
        operator +(
            Complex n,
            ComplexRational rational)
        {
            ComplexRational ret = new ComplexRational(rational);

            ret.AddInplace(n);
            return(ret);
        }
Exemplo n.º 2
0
        operator +(
            ComplexPolynomial polynomial,
            ComplexRational rational)
        {
            ComplexRational ret = new ComplexRational(rational);

            ret.AddInplace(polynomial);
            return(ret);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Subtract a rational from a polynomial.
 /// </summary>
 public static ComplexRational operator -(
     ComplexPolynomial polynomial,
     ComplexRational rational)
 {
     ComplexRational ret = new ComplexRational(rational);
     ret.NegateInplace();
     ret.AddInplace(polynomial);
     return ret;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Subtract a rational from a real number.
 /// </summary>
 public static ComplexRational operator -(
     Complex n,
     ComplexRational rational)
 {
     ComplexRational ret = new ComplexRational(rational);
     ret.NegateInplace();
     ret.AddInplace(n);
     return ret;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Add a complex number to a rational.
 /// </summary>
 public static ComplexRational operator +(
     ComplexRational rational,
     Complex n)
 {
     ComplexRational ret = new ComplexRational(rational);
     ret.AddInplace(n);
     return ret;
 }