public static boolean isOnSegment(Geo a,Geo b,Geo i){
  return ((a.distance(i) < a.distance(b)) && (b.distance(i) < b.distance(a)));
}

public static boolean isOnSegment ( Geo a , Geo b , Geo i ) { return ( ( a . distance ( i ) < a . distance ( b ) ) && ( b . distance ( i ) < b . distance ( a ) ) ) ; }
point i is on the great circle defined by the points a and b . returns true if i is between a and b , false otherwise . note : i is assumed to be on the great circle line .
