00001 00017 #include <grass/gis.h> 00018 00019 00033 int G_shortest_way(double *east1, double *east2) 00034 { 00035 if (G_projection() == PROJECTION_LL) { 00036 if (*east1 > *east2) 00037 while ((*east1 - *east2) > 180) 00038 *east2 += 360; 00039 else if (*east2 > *east1) 00040 while ((*east2 - *east1) > 180) 00041 *east1 += 360; 00042 } 00043 00044 return 0; 00045 }