code: public static Long getApproximateZoomLevel(double[] widths,
  			double[] heights, List<TileMatrix> tileMatrices, double width,
  			double height) {
  
  		Long widthZoomLevel = getApproximateZoomLevel(widths, tileMatrices,
  				width);
  		Long heightZoomLevel = getApproximateZoomLevel(heights, tileMatrices,
  				height);
  
  		Long expectedZoomLevel;
  		if (widthZoomLevel == null) {
  			expectedZoomLevel = heightZoomLevel;
  		} else if (heightZoomLevel == null) {
  			expectedZoomLevel = widthZoomLevel;
  		} else {
  			expectedZoomLevel = Math.max(widthZoomLevel, heightZoomLevel);
  		}
  
  		return expectedZoomLevel;
  	}
docs: Get the approximate zoom level for the provided width and height in the
  default units. Tiles may or may not exist for the returned zoom level.
  The approximate zoom level is determined using a factor of 2 from the
  zoom levels with tiles.
  
  @param widths
  sorted widths
  @param heights
  sorted heights
  @param tileMatrices
  tile matrices
  @param width
  width in default units
  @param height
  height in default units
  @return actual or approximate tile matrix zoom level
  @since 2.0.2