Exemplo n.º 1
0
        public void TestScaleVelocity()
        {
            var builder = new PlanParameters.Builder();

            builder.MaxVelocity = new double[] { 1000, -4 };
            Assert.Equal(builder.MaxVelocity, new double[] { 1000, -4 });
            Assert.Throws <ArgumentOutOfRangeException>(() => builder.ScaleVelocity(1.1));
            Assert.Throws <ArgumentOutOfRangeException>(() => builder.ScaleVelocity(-0.1));
            Assert.Equal(builder.ScaleVelocity(0.25).MaxVelocity, new double[] { 250, -1 });
        }