SphericalGeometryLibrary { public static final CoordinateBounds bounds(CoordinatePoint point, double distance) { return bounds(point.getLat(), point.getLon(), distance); }  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 testBounds() { CoordinateBounds bounds = SphericalGeometryLibrary.bounds( 47.97527158291236, -122.3527193069458, 400); double d1 = SphericalGeometryLibrary.distance(bounds.getMaxLat(), bounds.getMaxLon(), bounds.getMinLat(), bounds.getMaxLon()); assertEquals(800, d1, 0.01); double d2 = SphericalGeometryLibrary.distance(bounds.getMaxLat(), bounds.getMinLon(), bounds.getMinLat(), bounds.getMinLon()); assertEquals(800, d2, 0.01); double d3 = SphericalGeometryLibrary.distance(bounds.getMinLat(), bounds.getMaxLon(), bounds.getMinLat(), bounds.getMinLon()); assertEquals(800, d3, 0.1); double d4 = SphericalGeometryLibrary.distance(bounds.getMaxLat(), bounds.getMaxLon(), bounds.getMaxLat(), bounds.getMinLon()); assertEquals(800, d4, 0.1); }