Ejemplo n.º 1
0
        public void StaticConstrainTest(double x, double y, double maximumLength)
        {
            var vector            = new Vector2D(x, y);
            var constrainedVector = Vector2D.Constrain(vector, maximumLength);
            var minimumLength     = System.Math.Min(maximumLength, constrainedVector.Length);

            Assert.AreEqual(minimumLength, constrainedVector.Length, Helper.E);
        }