GRASS GIS 7 Programmer's Manual  7.0.5(2016)-r00000
short_way.c
Go to the documentation of this file.
1 
14 #include <grass/gis.h>
15 
28 void G_shortest_way(double *east1, double *east2)
29 {
30  if (G_projection() == PROJECTION_LL) {
31  if (*east1 > *east2)
32  while ((*east1 - *east2) > 180)
33  *east2 += 360;
34  else if (*east2 > *east1)
35  while ((*east2 - *east1) > 180)
36  *east1 += 360;
37  }
38 }
int G_projection(void)
Query cartographic projection.
Definition: proj1.c:32
void G_shortest_way(double *east1, double *east2)
Shortest way between two eastings.
Definition: short_way.c:28