Exemple #1
0
        public void ToVector2_PointF_returns_correct_vector()
        {
            var point  = new PointF(10.1f, 20.8f);
            var vector = point.ToVector2();

            NumericTestUtils.AssertAreEqual(10.1, vector.X);
            NumericTestUtils.AssertAreEqual(20.8, vector.Y);
        }
 public void Magnitude_returns_correct_result()
 {
     NumericTestUtils.AssertAreEqual(Math.Sqrt(5), _c1.Magnitude);
 }
 public void Phase_returns_correct_result()
 {
     NumericTestUtils.AssertAreEqual(-1.1071487177, _c1.Phase);
 }
 public void Abs_returns_correct_result()
 {
     NumericTestUtils.AssertAreEqual(Math.Sqrt(5), Complex.Abs(_c1));
 }