Exemplo n.º 1
0
        public void When_CrossWithNormalPlane_Expect_StartVector()
        {
            Vect3 vect1 = new Vect3(1, 2, 3);
            Tuple <Vect3, Vect3> plane = vect1.GetNormalPlane();
            Vect3 vect2 = Vect3.Cross(plane.Item1, plane.Item2);

            Assert.AreEqual(vect1.GetNormalized(), vect2.GetNormalized());
        }
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));
        }