Example #1
0
        public void AngleHandle_delta_test_4()
        {
            Vector v1 = new Vector(-1, 1);
            Vector v2 = new Vector(1, 1);

            double deltaCW  = Converter.AngleDeltaCW(v1, v2);
            double deltaCCW = Converter.AngleDeltaCCW(v1, v2);
            double deltaMin = Converter.AngleDelta(v1, v2);

            Assert.AreEqual(deltaCW, Math.PI / 2, _Variables.EQUALS_TOLERANCE);
            Assert.AreEqual(deltaCCW, 2 * Math.PI - Math.PI / 2, _Variables.EQUALS_TOLERANCE);
            Assert.AreEqual(deltaMin, Math.PI / 2, _Variables.EQUALS_TOLERANCE);
        }
Example #2
0
        public void AngleHandle_delta_test_2()
        {
            double a1 = Math.PI / 2 + Math.PI / 4;
            double a2 = Math.PI / 4;

            double deltaCW  = Converter.AngleDeltaCW(a1, a2);
            double deltaCCW = Converter.AngleDeltaCCW(a1, a2);
            double deltaMin = Converter.AngleDelta(a1, a2);

            Assert.AreEqual(deltaCW, Math.PI / 2, _Variables.EQUALS_TOLERANCE);
            Assert.AreEqual(deltaCCW, 2 * Math.PI - Math.PI / 2, _Variables.EQUALS_TOLERANCE);
            Assert.AreEqual(deltaMin, Math.PI / 2, _Variables.EQUALS_TOLERANCE);
        }