Beispiel #1
0
        public void When_ProjectOnPlane_Expect_Valid()
        {
            Vect3 vect1 = new Vect3(1, 2, 3);
            Vect3 vect2 = new Vect3(1, 0, 3);

            Assert.AreEqual(vect1.ProjectOnPlane(Vect3.Up), vect2);
            Assert.AreEqual(vect1.ProjectOnPlane(Vect3.Forward, Vect3.Right), vect2);
        }
Beispiel #2
0
        private void When_ProjectOnPlaneWithParallelBases_Expect_Exception_Helper()
        {
            Vect3 vect1 = new Vect3(1, 2, 3);
            Vect3 vect2 = new Vect3(1, 1, 1);
            Vect3 vect3 = new Vect3(2, 2, 2);

            vect3.ProjectOnPlane(vect2, vect3);
        }
Beispiel #3
0
        public void When_ProjectOnOrthogonalPlaneWithBases_Expect_Zero()
        {
            Vect3 vect = Vect3.Up;

            Assert.AreEqual(vect.ProjectOnPlane(Vect3.Right, Vect3.Forward), Vect3.Zero);
        }
Beispiel #4
0
        public void When_ProjectOnOrthogonalPlaneWithNormal_Expect_Zero()
        {
            Vect3 vect = 2 * Vect3.One;

            Assert.AreEqual(vect.ProjectOnPlane(Vect3.One), Vect3.Zero);
        }