GRASS Programmer's Manual  6.4.2(2012)
short_way.c
Go to the documentation of this file.
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 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines