@Test public void limitLongitudeTest() { Assert.assertEquals(-180, MercatorProjection.limitLongitude(-180), 0); Assert.assertEquals(0, MercatorProjection.limitLongitude(0), 0); Assert.assertEquals(180, MercatorProjection.limitLongitude(180), 0); }
public static double limitLongitude(double longitude) { return Math.max(Math.min(longitude, LONGITUDE_MAX), LONGITUDE_MIN); }
MercatorProjection { public static double limitLongitude(double longitude) { return Math.max(Math.min(longitude, LONGITUDE_MAX), LONGITUDE_MIN); } }
MercatorProjection { public static double limitLongitude(double longitude) { return Math.max(Math.min(longitude, LONGITUDE_MAX), LONGITUDE_MIN); } private  MercatorProjection(); }
MercatorProjection { public static double limitLongitude(double longitude) { return Math.max(Math.min(longitude, LONGITUDE_MAX), LONGITUDE_MIN); } private  MercatorProjection(); static double calculateGroundResolution(double latitude, byte zoomLevel); static double latitudeToPixelY(double latitude, byte zoomLevel); static long latitudeToTileY(double latitude, byte zoomLevel); static double limitLatitude(double latitude); static double limitLongitude(double longitude); static double longitudeToPixelX(double longitude, byte zoomLevel); static long longitudeToTileX(double longitude, byte zoomLevel); static double pixelXToLongitude(double pixelX, byte zoomLevel); static long pixelXToTileX(double pixelX, byte zoomLevel); static double pixelYToLatitude(double pixelY, byte zoomLevel); static long pixelYToTileY(double pixelY, byte zoomLevel); static double tileXToLongitude(long tileX, byte zoomLevel); static double tileYToLatitude(long tileY, byte zoomLevel); }
MercatorProjection { public static double limitLongitude(double longitude) { return Math.max(Math.min(longitude, LONGITUDE_MAX), LONGITUDE_MIN); } private  MercatorProjection(); static double calculateGroundResolution(double latitude, byte zoomLevel); static double latitudeToPixelY(double latitude, byte zoomLevel); static long latitudeToTileY(double latitude, byte zoomLevel); static double limitLatitude(double latitude); static double limitLongitude(double longitude); static double longitudeToPixelX(double longitude, byte zoomLevel); static long longitudeToTileX(double longitude, byte zoomLevel); static double pixelXToLongitude(double pixelX, byte zoomLevel); static long pixelXToTileX(double pixelX, byte zoomLevel); static double pixelYToLatitude(double pixelY, byte zoomLevel); static long pixelYToTileY(double pixelY, byte zoomLevel); static double tileXToLongitude(long tileX, byte zoomLevel); static double tileYToLatitude(long tileY, byte zoomLevel); static final double EARTH_CIRCUMFERENCE; static final double LATITUDE_MAX; static final double LATITUDE_MIN; static final double LONGITUDE_MAX; static final double LONGITUDE_MIN; }