public void TestAzimuth() { double xA = 50342.464; double yA = 3423.232; double xB = 50289.874; double yB = 3528.978; var az = SurMath.Azimuth(xA, yA, xB, yB); Assert.AreEqual <string>("116¡ã26¡ä32.102984¡å", SurMath.RadtoString(az.a)); xA = 50289.874; yA = 3528.978; xB = 50342.464; yB = 3423.232; az = SurMath.Azimuth(xA, yA, xB, yB); Assert.AreEqual <string>("296¡ã26¡ä32.102984¡å", SurMath.RadtoString(az.a)); xA = 50342.464; yA = 3423.232; xB = 50389.874; yB = 3528.978; az = SurMath.Azimuth(xA, yA, xB, yB); Assert.AreEqual <string>("65¡ã51¡ä05.295961¡å", SurMath.RadtoString(az.a)); xA = 50389.874; yA = 3528.978; xB = 50342.464; yB = 3423.232; az = SurMath.Azimuth(xA, yA, xB, yB); Assert.AreEqual <string>("245¡ã51¡ä05.295961¡å", SurMath.RadtoString(az.a)); }
public void TestAzimuth() { double a = SurMath.Azimuth(12.234, 23.1234, 13.2323, 24.232332); Assert.AreEqual(0.837851107, a, 1e-9); a = SurMath.Azimuth(12.234, 23.1234, 3.2323, 24.232332); Assert.AreEqual(3.019018832, a, 1e-9); a = SurMath.Azimuth(12.234, 23.1234, 3.2323, 4.232332); Assert.AreEqual(4.267712913, a, 1e-9); a = SurMath.Azimuth(12.234, 23.1234, 13.2323, 4.232332); Assert.AreEqual(4.765184951, a, 1e-9); }