Exemplo n.º 1
0
        public void CalculatesLimitsOfOpposingRotor()
        {
            var limits   = new RotorLimits(35, 110);
            var opposing = new RotorLimits(250, 325);

            Assert.That(limits.Opposing(), Is.EqualTo(opposing));
        }
Exemplo n.º 2
0
        public void AppliesLowerLimitToDeltasWhichCrossIt(float value, float delta, float limit, float expected)
        {
            var limits = new RotorLimits(limit, float.MaxValue);

            Assert.That(limits.ClampDelta(value, delta), Is.EqualTo(expected).Within(0.0001f));
        }
Exemplo n.º 3
0
 public void CalculatesSmallestDifference(float a, float b, float expected)
 {
     Assert.That(RotorLimits.DifferenceDegrees(a, b), Is.EqualTo(expected).Within(0.0001f));
     Assert.That(RotorLimits.DifferenceDegrees(b, a), Is.EqualTo(expected).Within(0.0001f));
 }
Exemplo n.º 4
0
 public virtual void ApplyLimits(RotorLimits newLimits)
 {
 }