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