@Test public void testNonZeroInitial() { RatioZoomContext ctxt = new RatioZoomContext(2, 5000000, 2); assertThat(ctxt.getScaleDenominator(0), Matchers.closeTo(5000000 * 4, EPSILON)); assertThat(ctxt.getScaleDenominator(1), Matchers.closeTo(5000000 * 2, EPSILON)); assertThat(ctxt.getScaleDenominator(2), Matchers.closeTo(5000000, EPSILON)); assertThat(ctxt.getScaleDenominator(3), Matchers.closeTo(5000000 / 2, EPSILON)); assertThat(ctxt.getScaleDenominator(4), Matchers.closeTo(5000000 / 4, EPSILON)); }
@Override protected double getScaleDenominator(double level) { return initialScale / Math.pow(ratio, level - initialLevel); }
RatioZoomContext extends ContinuousZoomContext implements ZoomContext { @Override protected double getScaleDenominator(double level) { return initialScale / Math.pow(ratio, level - initialLevel); } }
RatioZoomContext extends ContinuousZoomContext implements ZoomContext { @Override protected double getScaleDenominator(double level) { return initialScale / Math.pow(ratio, level - initialLevel); } RatioZoomContext(final double initialScale, final double ratio);  RatioZoomContext(final int initialLevel, final double initialScale, final double ratio); }
RatioZoomContext extends ContinuousZoomContext implements ZoomContext { @Override protected double getScaleDenominator(double level) { return initialScale / Math.pow(ratio, level - initialLevel); } RatioZoomContext(final double initialScale, final double ratio);  RatioZoomContext(final int initialLevel, final double initialScale, final double ratio); @Override boolean isInRange(int level); }
RatioZoomContext extends ContinuousZoomContext implements ZoomContext { @Override protected double getScaleDenominator(double level) { return initialScale / Math.pow(ratio, level - initialLevel); } RatioZoomContext(final double initialScale, final double ratio);  RatioZoomContext(final int initialLevel, final double initialScale, final double ratio); @Override boolean isInRange(int level);  }