SphericalGeometryLibrary { public static CoordinatePoint getCenterOfBounds(CoordinateBounds b) { return new CoordinatePoint((b.getMinLat() + b.getMaxLat()) / 2, (b.getMinLon() + b.getMaxLon()) / 2); }  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 testGetCenterOfBounds() { CoordinateBounds b = new CoordinateBounds(-1.0, -2.0, 4.0, 3.6); CoordinatePoint p = SphericalGeometryLibrary.getCenterOfBounds(b); assertEquals(1.5, p.getLat(), 0.0); assertEquals(0.8, p.getLon(), 0.0); }