SphericalGeometryLibrary { public static final double distance(double lat1, double lon1, double lat2, double lon2) { return distance(lat1, lon1, lat2, lon2, RADIUS_OF_EARTH_IN_KM * 1000); }  static double distanceFaster(double lat1, double lon1, double lat2,
      double lon2); static final double distance(double lat1, double lon1, double lat2,
      double lon2); static final double distance(CoordinatePoint a, CoordinatePoint b); static final double distance(double lat1, double lon1, double lat2,
      double lon2, double radius); static final CoordinateBounds bounds(CoordinatePoint point,
      double distance); static CoordinateBounds bounds(CoordinateBounds b, double distance); static final CoordinateBounds bounds(double lat, double lon,
      double distance); static final CoordinateBounds bounds(double lat, double lon,
      double latDistance, double lonDistance); static final CoordinateBounds boundsFromLatLonOffset(double lat,
      double lon, double latOffset, double lonOffset); static final CoordinateBounds boundsFromLatLonSpan(double lat,
      double lon, double latSpan, double lonSpan); static CoordinatePoint getCenterOfBounds(CoordinateBounds b); static double getOrientation(double latFrom, double lonFrom,
      double latTo, double lonTo); static CoordinatePoint projectPointToSegmentAppropximate(
      CoordinatePoint point, CoordinatePoint segmentStart,
      CoordinatePoint segmentEnd); static final double RADIUS_OF_EARTH_IN_KM; static final double COS_MAX_LAT; static final double METERS_PER_DEGREE_AT_EQUATOR; }
@Test public void testDistance() { double d1 = SphericalGeometryLibrary.distance(47.66855200022102, -122.2901701927185, 47.67031486931084, -122.28911876678467); assertEquals(211.24, d1, 0.01); double d2 = SphericalGeometryLibrary.distance(47.670300419806246, -122.29019165039062, 47.67579094347484, -122.30066299438477); assertEquals(993.70, d2, 0.01); double d3 = SphericalGeometryLibrary.distance(47.2561898535, -122.439996129, 47.2555220025, -122.439844215); assertEquals(75.14, d3, 0.01); }