@Test public void testCenter() { Rect r1 = new Rect(0, 1000000, 50000000, 51000000); assertEquals(new GeoCoordinate(50500000, 500000), r1.center()); }
public GeoCoordinate center() { return new GeoCoordinate(this.minLatitudeE6 + (int) Math.round((this.maxLatitudeE6 - this.minLatitudeE6) / 2.0d), this.minLongitudeE6 + (int) Math.round((this.maxLongitudeE6 - this.minLongitudeE6) / 2.0d)); }
Rect { public GeoCoordinate center() { return new GeoCoordinate(this.minLatitudeE6 + (int) Math.round((this.maxLatitudeE6 - this.minLatitudeE6) / 2.0d), this.minLongitudeE6 + (int) Math.round((this.maxLongitudeE6 - this.minLongitudeE6) / 2.0d)); } }
Rect { public GeoCoordinate center() { return new GeoCoordinate(this.minLatitudeE6 + (int) Math.round((this.maxLatitudeE6 - this.minLatitudeE6) / 2.0d), this.minLongitudeE6 + (int) Math.round((this.maxLongitudeE6 - this.minLongitudeE6) / 2.0d)); } Rect(GeoCoordinate gc);  Rect(int minLongitudeE6, int maxLongitudeE6, int minLatitudeE6, int maxLatitudeE6);  Rect(double minLongitude, double maxLongitude, double minLatitude, double maxLatitude);  Rect(Rect rect); }
Rect { public GeoCoordinate center() { return new GeoCoordinate(this.minLatitudeE6 + (int) Math.round((this.maxLatitudeE6 - this.minLatitudeE6) / 2.0d), this.minLongitudeE6 + (int) Math.round((this.maxLongitudeE6 - this.minLongitudeE6) / 2.0d)); } Rect(GeoCoordinate gc);  Rect(int minLongitudeE6, int maxLongitudeE6, int minLatitudeE6, int maxLatitudeE6);  Rect(double minLongitude, double maxLongitude, double minLatitude, double maxLatitude);  Rect(Rect rect); static boolean overlaps(int minLon1, int maxLon1, int minLat1, int maxLat1, int minLon2, int maxLon2,
			int minLat2, int maxLat2); static Rect fromString(String rectString); int getMinLongitudeE6(); int getMaxLongitudeE6(); int getMinLatitudeE6(); int getMaxLatitudeE6(); GeoCoordinate center(); double distance(Rect otherRect); @Override boolean equals(Object obj); void expandToInclude(GeoCoordinate gc); void expandToInclude(int latE6, int lonE6); void expandToInclude(Rect otherRect); GeoCoordinate getCenter(); @Override int hashCode(); boolean includes(GeoCoordinate c); boolean includes(int latitudeE6, int longitudeE6); boolean overlaps(Rect r); @Override String toString(); }
Rect { public GeoCoordinate center() { return new GeoCoordinate(this.minLatitudeE6 + (int) Math.round((this.maxLatitudeE6 - this.minLatitudeE6) / 2.0d), this.minLongitudeE6 + (int) Math.round((this.maxLongitudeE6 - this.minLongitudeE6) / 2.0d)); } Rect(GeoCoordinate gc);  Rect(int minLongitudeE6, int maxLongitudeE6, int minLatitudeE6, int maxLatitudeE6);  Rect(double minLongitude, double maxLongitude, double minLatitude, double maxLatitude);  Rect(Rect rect); static boolean overlaps(int minLon1, int maxLon1, int minLat1, int maxLat1, int minLon2, int maxLon2,
			int minLat2, int maxLat2); static Rect fromString(String rectString); int getMinLongitudeE6(); int getMaxLongitudeE6(); int getMinLatitudeE6(); int getMaxLatitudeE6(); GeoCoordinate center(); double distance(Rect otherRect); @Override boolean equals(Object obj); void expandToInclude(GeoCoordinate gc); void expandToInclude(int latE6, int lonE6); void expandToInclude(Rect otherRect); GeoCoordinate getCenter(); @Override int hashCode(); boolean includes(GeoCoordinate c); boolean includes(int latitudeE6, int longitudeE6); boolean overlaps(Rect r); @Override String toString(); public int maxLatitudeE6; public int maxLongitudeE6; public int minLatitudeE6; public int minLongitudeE6; }