Пример #1
0
        public void PotentialForceTest()
        {
            Vector3 point        = new Vector3(5, 5, 5);
            var     centralForce = centralPotential.ToVectorField();

            Vector3 expectedForceValue = -(1.0 / point.MagSquared) * point.UnitDirection;

            Assert.That(expectedForceValue, Izz.EqualTo(centralForce.Value(point)).Within(Math.Pow(10, -17)));
        }
Пример #2
0
 public void CrossProductTest(Vector3 a, Vector3 b, Vector3 crossProduct)
 {
     Assert.That(a % b, Izz.EqualTo(crossProduct).Within(Math.Pow(10, -10)));
 }