@Test public void testNumTiles() { Assert.assertEquals(7, UIServlet.getNumTiles(60*24, 60*24*7, 48)); Assert.assertEquals(48, UIServlet.getNumTiles(60, 60*24*7, 48)); Assert.assertEquals(48, UIServlet.getNumTiles(1, 60*24*7, 48)); }
static int getNumTiles(int zoomLevelMinutes, int maxMinutesToFetch, int maxTilesToDisplay) { return Math.min(maxMinutesToFetch / zoomLevelMinutes, maxTilesToDisplay); }
UIServlet extends HttpServlet { static int getNumTiles(int zoomLevelMinutes, int maxMinutesToFetch, int maxTilesToDisplay) { return Math.min(maxMinutesToFetch / zoomLevelMinutes, maxTilesToDisplay); } }
UIServlet extends HttpServlet { static int getNumTiles(int zoomLevelMinutes, int maxMinutesToFetch, int maxTilesToDisplay) { return Math.min(maxMinutesToFetch / zoomLevelMinutes, maxTilesToDisplay); }  }
UIServlet extends HttpServlet { static int getNumTiles(int zoomLevelMinutes, int maxMinutesToFetch, int maxTilesToDisplay) { return Math.min(maxMinutesToFetch / zoomLevelMinutes, maxTilesToDisplay); }   }
UIServlet extends HttpServlet { static int getNumTiles(int zoomLevelMinutes, int maxMinutesToFetch, int maxTilesToDisplay) { return Math.min(maxMinutesToFetch / zoomLevelMinutes, maxTilesToDisplay); }    }