GaussianGridConfig { static double[] computeLongitudePoints(int columnCount) { final double[] longitudePoints = new double[columnCount]; final double delta = 360.0 / columnCount; for (int i = 0; i < longitudePoints.length; i++) { longitudePoints[i] = i * delta; } return longitudePoints; } private  GaussianGridConfig();   }
@Test public void testLongitudeComputation() throws Exception { double[] lons; lons = GaussianGridConfig.computeLongitudePoints(2); assertEquals(2, lons.length); assertEquals(0.0, lons[0], 0.0); assertEquals(180.0, lons[1], 0.0); lons = GaussianGridConfig.computeLongitudePoints(360); assertEquals(360, lons.length); assertEquals(0.0, lons[0], 0.0); assertEquals(179.0, lons[179], 0.0); assertEquals(180.0, lons[180], 0.0); assertEquals(359.0, lons[359], 0.0); lons = GaussianGridConfig.computeLongitudePoints(9); assertEquals(9, lons.length); assertEquals(0.0, lons[0], 0.0); assertEquals(160.0, lons[4], 0.0); assertEquals(320.0, lons[8], 0.0); }