code: private static boolean closerToZoomIn(double[] lengths, double length,
  			int lengthIndex) {
  
  		// Zoom level distance to the zoomed in length
  		double zoomInDistance = Math.log(length / lengths[lengthIndex - 1])
  				/ Math.log(2);
  
  		// Zoom level distance to the zoomed out length
  		double zoomOutDistance = Math.log(length / lengths[lengthIndex])
  				/ Math.log(.5);
  
  		boolean zoomIn = zoomInDistance < zoomOutDistance;
  
  		return zoomIn;
  	}
docs: Determine if the length at the index is closer by a factor of two to the
  next zoomed in level / lower index
  
  @param lengths
  sorted lengths
  @param length
  current length
  @param lengthIndex
  length index
  @return true if closer to zoomed in length