public void Division_return_correct_result()
        {
            var expected = new Complex(-0.410256, 0.051282);

            ComplexTestUtils.AssertAreEqual(expected, _c1 / _c2);
            ComplexTestUtils.AssertAreEqual(expected, Complex.Divide(_c1, _c2));
        }
Пример #2
0
 /// <summary>
 /// Divides a scalar value by a complex number.
 /// </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 result of division.</returns>
 ///
 public static Complex operator /(double s, Complex a)
 {
     return(Complex.Divide(s, a));
 }
Пример #3
0
 /// <summary>
 /// Divides one complex number by another complex number.
 /// </summary>
 ///
 /// <param name="a">A <see cref="Complex"/> instance.</param>
 /// <param name="b">A <see cref="Complex"/> instance.</param>
 ///
 /// <returns>A new Complex instance containing the result.</returns>
 /// <returns>Returns new <see cref="Complex"/> instance containing the result of division.</returns>
 ///
 public static Complex operator /(Complex a, Complex b)
 {
     return(Complex.Divide(a, b));
 }
Пример #4
0
 /// <summary>
 /// Divides a complex number by 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 result of division.</returns>
 ///
 public static Complex operator /(Complex a, double s)
 {
     return(Complex.Divide(a, s));
 }