### Question:
LogFontScalar implements FontScalar { @Override public float scale(final int value, final int minValue, final int maxValue) { final double leftSpan = Math.log(maxValue) - Math.log(minValue); final double rightSpan = maxFont - minFont; final double valueScaled = (Math.log(value) - Math.log(minValue)) / leftSpan; return (float) (minFont + (valueScaled * rightSpan)); } LogFontScalar(final int minFont, final int maxFont); @Override float scale(final int value, final int minValue, final int maxValue);  }### Answer:
@Test public void testScale() { final LogFontScalar fontScalar = new LogFontScalar(-1, 13); Assert.assertEquals(8.333333f, fontScalar.scale(4, 1, 8), 0.0f); final LogFontScalar fontScalar2 = new LogFontScalar(0, 0); Assert.assertEquals(Float.NaN, fontScalar2.scale(0, 0, 0), 0.0f); }