Eeap { int getZoneIndex(double lon, double lat) { if (lat <= maxLat && lat > cutLat) { return 0; } if (lat <= -cutLat && lat > -maxLat) { return 1; } if (lat <= cutLat && lat > -cutLat) { if (lon < 0.0) { lon += 360.0; } return (int) Math.floor(lon / deltaLon) + 2; } return -1; } private  Eeap();   }
@Test public void testGetZoneIndex() { assertEquals(0, eeap.getZoneIndex(0.0, 75.1)); assertEquals(0, eeap.getZoneIndex(0.0, 89.0)); assertEquals(1, eeap.getZoneIndex(0.0, -75.1)); assertEquals(1, eeap.getZoneIndex(0.0, -88.9)); assertEquals(2, eeap.getZoneIndex(0.0, 0.0)); assertEquals(12, eeap.getZoneIndex(50.0, 0.0)); assertEquals(64, eeap.getZoneIndex(-50.0, 0.0)); assertEquals(-1, eeap.getZoneIndex(0.0, -89.4)); assertEquals(-1, eeap.getZoneIndex(0.0, 89.2)); }