public void Vector3DistributivePropertyTest()
 {
     for (int i = 0; i < cases3.Length; i++)
     {
         var a = cases3[i];
         var b = cases3[offset3(i, 1)];
         var c = cases3[offset3(i, 3)];
         AssertDouble.AreEqual(a.Dot(b + c), a.Dot(b) + a.Dot(c), 1e-5);
     }
 }
        public void Vector3CommutativePropertyTest()
        {
            for (int i = 0; i < cases3.Length; i++)
            {
                var a = cases3[i];
                var b = cases3[offset3(i, 1)];

                AssertDouble.AreEqual(a.Dot(b), b.Dot(a));
            }
        }
 public void Vector2DistributivePropertyTest()
 {
     for (int i = 0; i < cases2.Length; i++)
     {
         var a = cases2[i];
         var b = cases2[offset2(i, 1)];
         var c = cases2[offset2(i, 2)];
         AssertDouble.AreEqual(a.Dot(b + c), a.Dot(b) + a.Dot(c));
     }
 }
 public void Vector2BilinearPropertyTest()
 {
     for (int i = 0; i < cases2.Length; i++)
     {
         var   a = cases2[i];
         var   b = cases2[offset2(i, 1)];
         var   c = cases2[offset2(i, 2)];
         float r = (float)Math.E;
         AssertDouble.AreEqual(a.Dot(r * b + c), r * a.Dot(b) + a.Dot(c), 1e-5);
     }
 }
 public void Vector3MagnitudeSquaredOfTrianglesTest()
 {
     AssertDouble.AreEqual(new Vector3(1, 1, 1).MagnitudeSquared(), 3);
     AssertDouble.AreEqual(new Vector3(1, 2, 2).MagnitudeSquared(), 9);
     AssertDouble.AreEqual(new Vector3(1, 4, 8).MagnitudeSquared(), 81);
 }
 public void Vector2MagnitudeSquaredOfTrianglesTest()
 {
     AssertDouble.AreEqual(new Vector2(1, 1).MagnitudeSquared(), 2);
     AssertDouble.AreEqual(new Vector2(3, 4).MagnitudeSquared(), 25);
 }
 public void Vector3MagnitudeOfTrianglesTest()
 {
     AssertDouble.AreEqual(new Vector3(1, 1, 1).Magnitude(), Math.Sqrt(3));
     AssertDouble.AreEqual(new Vector3(1, 2, 2).Magnitude(), 3);
     AssertDouble.AreEqual(new Vector3(1, 4, 8).Magnitude(), 9);
 }
 public void Vector2MagnitudeOfTrianglesTest()
 {
     AssertDouble.AreEqual(new Vector2(1, 1).Magnitude(), Math.Sqrt(2));
     AssertDouble.AreEqual(new Vector2(3, 4).Magnitude(), 5);
 }
 public void Vector2OrthogonalPropertyTest()
 {
     AssertDouble.AreEqual(new Vector2(0, 1).Dot(new Vector2(1, 0)), 0);
 }