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); }
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); }
public void When_ProjectOnOrthogonalPlaneWithBases_Expect_Zero() { Vect3 vect = Vect3.Up; Assert.AreEqual(vect.ProjectOnPlane(Vect3.Right, Vect3.Forward), Vect3.Zero); }
public void When_ProjectOnOrthogonalPlaneWithNormal_Expect_Zero() { Vect3 vect = 2 * Vect3.One; Assert.AreEqual(vect.ProjectOnPlane(Vect3.One), Vect3.Zero); }