Exemplo n.º 1
0
        public void When_CalculateDotProduct_Expect_Dot()
        {
            Vect3 v1 = new Vect3(1, 2, 3);
            Vect3 v2 = new Vect3(3, 2, 1);

            Assert.AreEqual(Vect3.Dot(v1, v2), 10);
        }
Exemplo n.º 2
0
        public void When_DotWithNormalPlane_Expect_Zero()
        {
            Vect3 vect1 = new Vect3(1, 2, 3);
            Tuple <Vect3, Vect3> plane = vect1.GetNormalPlane();

            Assert.Zero(Vect3.Dot(vect1, plane.Item1));
            Assert.Zero(Vect3.Dot(vect1, plane.Item2));
        }
Exemplo n.º 3
0
 public void When_CalculateParallelNormalizedDotProduct_Expect_One()
 {
     Assert.AreEqual(Vect3.Dot(Vect3.Forward, Vect3.Forward), 1);
 }
Exemplo n.º 4
0
 public void When_CalculateOrthogonalDotProduct_Expect_Zero()
 {
     Assert.AreEqual(Vect3.Dot(Vect3.Up, Vect3.Forward), 0);
 }