/**
  * Distance of point C from line segment AB.
  *
  * @param c Point C.
  * @param a Point A.
  * @param b Point B.
  * @return Distance.
  */
 public static double distanceFromSegment(LatLon c, LatLon a, LatLon b) {
   return distanceFromSegment(
       c.getX(), c.getY(),
       a.getX(), a.getY(),
       b.getX(), b.getY());
 }