774 edge_set(-50.0, 0.0, 50.0, 0.0, &e1);
775 edge_set(-5.0, 20.0, 0.0, 1.0, &e2);
780 printf(
"\nDISTANCE == %.8g\n", d);
782 CU_ASSERT_DOUBLE_EQUAL(d, M_PI / 180.0, 0.00001);
783 CU_ASSERT_DOUBLE_EQUAL(c1.
lat, 0.0, 0.00001);
784 CU_ASSERT_DOUBLE_EQUAL(c2.
lat, M_PI / 180.0, 0.00001);
785 CU_ASSERT_DOUBLE_EQUAL(c1.
lon, 0.0, 0.00001);
786 CU_ASSERT_DOUBLE_EQUAL(c2.
lon, 0.0, 0.00001);
static void edge_set(double lon1, double lat1, double lon2, double lat2, GEOGRAPHIC_EDGE *e)
double edge_distance_to_edge(const GEOGRAPHIC_EDGE *e1, const GEOGRAPHIC_EDGE *e2, GEOGRAPHIC_POINT *closest1, GEOGRAPHIC_POINT *closest2)
Calculate the distance between two edges.
Two-point great circle segment from a to b.
Point in spherical coordinates on the world.