Exemple #1
0
        public void RandomAngleTest(double arcStart, double arcEnd)
        {
            double angle = Probability.RandomAngle(arcStart, arcEnd);

            arcStart = Numerical.Modulo(arcStart, 360);
            arcEnd   = Numerical.Modulo(arcEnd, 360);
            if (arcStart >= arcEnd)
            {
                arcEnd += 360;
            }
            if (angle < arcStart)
            {
                angle += 360;
            }
            Assert.IsFalse(angle < arcStart);
            Assert.IsFalse(angle > arcEnd);
        }
        public void ModuloTest(double value, double modulus, double expectedResult)
        {
            double result = Numerical.Modulo(value, modulus);

            Assert.AreEqual(expectedResult, result, 0.001);
        }