Exemplo n.º 1
0
        public void Azimuth_setFromXY()
        {
            Tuple <Double, Double, Double>[] testCases =
            {
                new Tuple <Double, Double, Double>(10,   2,  78.690067526),
                new Tuple <Double, Double, Double>(10,  -2, 101.309932474),
                new Tuple <Double, Double, Double>(-10,  2, 281.309932474),
                new Tuple <Double, Double, Double>(-10, -2, 258.690067526)
            };

            foreach (var testCase in testCases)
            {
                Azimuth anAzimuth = new Azimuth();
                anAzimuth.setFromXY(testCase.Item1, testCase.Item2);
                Double actualDegrees = anAzimuth.getAsDegreesDouble();

                Assert.AreEqual(expected: testCase.Item3, actual: actualDegrees, delta: delta);
            }
        }