Ejemplo n.º 1
0
        public void TopOfCirclePiWidth()
        {
            CircleArc arc = new CircleArc(Math.PI, Math.PI / 2);

            Assert.AreEqual(Math.PI, arc.GetRadianInterval().Item1);
            Assert.AreEqual(0, arc.GetRadianInterval().Item2);
        }
Ejemplo n.º 2
0
        public void BeginsAtTopOfCircle()
        {
            CircleArc arc = new CircleArc(0, Math.PI / 2);

            Assert.AreEqual(Math.PI / 2, arc.GetRadianInterval().Item1);
            Assert.AreEqual(Math.PI / 2, arc.GetRadianInterval().Item2);
        }
Ejemplo n.º 3
0
        public void MoveCounterClockwise5PI()
        {
            CircleArc arc         = new CircleArc(Math.PI / 2, Math.PI / 2);
            double    pi          = Math.PI;
            double    startRadian = (pi / 2 + (pi / 2) / 2) + pi;
            double    endRadian   = (pi / 2 - (pi / 2) / 2) + pi;

            arc.MoveCounterClockwise(Math.PI * 5);

            Assert.AreEqual(startRadian, arc.GetRadianInterval().Item1, 0.01);
            Assert.AreEqual(endRadian, arc.GetRadianInterval().Item2, 0.01);
        }