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); }
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)); }
public void When_CalculateParallelNormalizedDotProduct_Expect_One() { Assert.AreEqual(Vect3.Dot(Vect3.Forward, Vect3.Forward), 1); }
public void When_CalculateOrthogonalDotProduct_Expect_Zero() { Assert.AreEqual(Vect3.Dot(Vect3.Up, Vect3.Forward), 0); }