test_class.file: seeking-core/src/test/java/com/eharmony/matching/seeking/query/geometry/GeoBoxMakerTest.java
test_class.identifier: GeoBoxMakerTest
test_case.body: @Test
      public void make_Degrees_equator() {
          GeoBoxMaker b = new GeoBoxMaker(DistanceUnits.DEGREES);
          Point<Double> p = Point.create(0D,0D);
          Box<Double> box = b.make(p, 1D);
          assertEquals(Box.create(-1D, -1D, 1D, 1D), box);
      }
test_case.class_method_signature: GeoBoxMakerTest.make_Degrees_equator()
test_case.full_signature: @Test public void make_Degrees_equator()
test_case.identifier: make_Degrees_equator
test_case.invocations: create make assertEquals create
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void make_Degrees_equator()
focal_class.declarator: EARTH_RADIUS_KILOMETERS = 6371
focal_class.modifier: protected static final
focal_class.original_string: protected static final int EARTH_RADIUS_KILOMETERS = 6371;
focal_class.type: int
focal_class.var_name: EARTH_RADIUS_KILOMETERS
focal_class.declarator: EARTH_RADIUS_MILES = 3959
focal_class.modifier: protected static final
focal_class.original_string: protected static final int EARTH_RADIUS_MILES = 3959;
focal_class.type: int
focal_class.var_name: EARTH_RADIUS_MILES
focal_class.declarator: MIN_LAT = -Math.PI / 2
focal_class.modifier: protected static final
focal_class.original_string: protected static final double MIN_LAT = -Math.PI / 2;
focal_class.type: double
focal_class.var_name: MIN_LAT
focal_class.declarator: MAX_LAT = Math.PI / 2
focal_class.modifier: protected static final
focal_class.original_string: protected static final double MAX_LAT = Math.PI / 2;
focal_class.type: double
focal_class.var_name: MAX_LAT
focal_class.declarator: MIN_LON = -Math.PI
focal_class.modifier: protected static final
focal_class.original_string: protected static final double MIN_LON = -Math.PI;
focal_class.type: double
focal_class.var_name: MIN_LON
focal_class.declarator: MAX_LON = Math.PI
focal_class.modifier: protected static final
focal_class.original_string: protected static final double MAX_LON = Math.PI;
focal_class.type: double
focal_class.var_name: MAX_LON
focal_class.declarator: TWO_PI = 2D * Math.PI
focal_class.modifier: protected static final
focal_class.original_string: protected static final double TWO_PI = 2D * Math.PI;
focal_class.type: double
focal_class.var_name: TWO_PI
focal_class.declarator: units
focal_class.modifier: private final
focal_class.original_string: private final DistanceUnits units;
focal_class.type: DistanceUnits
focal_class.var_name: units
focal_class.file: seeking-core/src/main/java/com/eharmony/matching/seeking/query/geometry/GeoBoxMaker.java
focal_class.identifier: GeoBoxMaker
focal_class.interfaces: implements BoxMaker
focal_class.class_method_signature: GeoBoxMaker.GeoBoxMaker(DistanceUnits units)
focal_class.full_signature: public  GeoBoxMaker(DistanceUnits units)
focal_class.identifier: GeoBoxMaker
focal_class.modifiers: public
focal_class.parameters: (DistanceUnits units)
focal_class.signature:  GeoBoxMaker(DistanceUnits units)
focal_class.class_method_signature: GeoBoxMaker.make(Point<N> center,
              N radius)
focal_class.full_signature: @Override // http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates public Box<N> make(Point<N> center,
              N radius)
focal_class.identifier: make
focal_class.modifiers: @Override // http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates public
focal_class.parameters: (Point<N> center,
              N radius)
focal_class.return: Box<N>
focal_class.signature: Box<N> make(Point<N> center,
              N radius)
focal_class.class_method_signature: GeoBoxMaker.radiansFromUnits(double magnitude)
focal_class.full_signature: private double radiansFromUnits(double magnitude)
focal_class.identifier: radiansFromUnits
focal_class.modifiers: private
focal_class.parameters: (double magnitude)
focal_class.return: double
focal_class.signature: double radiansFromUnits(double magnitude)
focal_class.class_method_signature: GeoBoxMaker.degreesToRadians(double degrees)
focal_class.full_signature: public static double degreesToRadians(double degrees)
focal_class.identifier: degreesToRadians
focal_class.modifiers: public static
focal_class.parameters: (double degrees)
focal_class.return: double
focal_class.signature: double degreesToRadians(double degrees)
focal_class.class_method_signature: GeoBoxMaker.radiansToDegrees(double radians)
focal_class.full_signature: public static double radiansToDegrees(double radians)
focal_class.identifier: radiansToDegrees
focal_class.modifiers: public static
focal_class.parameters: (double radians)
focal_class.return: double
focal_class.signature: double radiansToDegrees(double radians)
focal_class.class_method_signature: GeoBoxMaker.kilometersToRadians(double kilometers)
focal_class.full_signature: public static double kilometersToRadians(double kilometers)
focal_class.identifier: kilometersToRadians
focal_class.modifiers: public static
focal_class.parameters: (double kilometers)
focal_class.return: double
focal_class.signature: double kilometersToRadians(double kilometers)
focal_class.class_method_signature: GeoBoxMaker.milesToRadians(double miles)
focal_class.full_signature: public static double milesToRadians(double miles)
focal_class.identifier: milesToRadians
focal_class.modifiers: public static
focal_class.parameters: (double miles)
focal_class.return: double
focal_class.signature: double milesToRadians(double miles)
focal_method.body: @Override
      // http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates
      public <N extends Number & Comparable<N>> Box<N> make(Point<N> center,
              N radius) {
          // angular distance in radians on a great circle
          double radDist = radiansFromUnits(radius.doubleValue());
  
          double radLat = degreesToRadians(center.getX().doubleValue());
          double radLon = degreesToRadians(center.getY().doubleValue());
          double minLat = radLat - radDist;
          double maxLat = radLat + radDist;
  
          double minLon, maxLon;
          if (minLat > MIN_LAT && maxLat < MAX_LAT) {
              double deltaLon = Math.asin(Math.sin(radDist) / Math.cos(radLat));
              minLon = radLon - deltaLon;
              maxLon = radLon + deltaLon;
              if (minLon < MIN_LON) {
                  minLon += TWO_PI;
              }
              if (maxLon > MAX_LON) {
                  maxLon -= TWO_PI;
              }
          } else {
              // a pole is within the distance
              minLat = Math.max(minLat, MIN_LAT);
              maxLat = Math.min(maxLat, MAX_LAT);
              minLon = MIN_LON;
              maxLon = MAX_LON;
          }
          
          // hack for the generic numbers
          N zero = subtract(radius, radius);
          N minLatN = add(zero, radiansToDegrees(minLat));
          N maxLatN = add(zero, radiansToDegrees(maxLat));
          N minLonN = add(zero, radiansToDegrees(minLon));
          N maxLonN = add(zero, radiansToDegrees(maxLon));
  
          return new Box<N>(
                  new Point<N>(minLatN,minLonN),
                  new Point<N>(maxLatN,maxLonN));
      }
focal_method.class_method_signature: GeoBoxMaker.make(Point<N> center,
              N radius)
focal_method.full_signature: @Override // http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates public Box<N> make(Point<N> center,
              N radius)
focal_method.identifier: make
focal_method.invocations: radiansFromUnits doubleValue degreesToRadians doubleValue getX degreesToRadians doubleValue getY asin sin cos max min subtract add radiansToDegrees add radiansToDegrees add radiansToDegrees add radiansToDegrees
focal_method.modifiers: @Override // http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates public
focal_method.parameters: (Point<N> center,
              N radius)
focal_method.return: Box<N>
focal_method.signature: Box<N> make(Point<N> center,
              N radius)