getResolutionForExtentInternal(extent, size) {
    size = size || this.getViewportSizeMinusPadding_();
    const xResolution = getWidth(extent) / size[0];
    const yResolution = getHeight(extent) / size[1];
    return Math.max(xResolution, yResolution);
  }
Get the resolution for a provided extent (in map units) and size (in pixels).
@param {import("./extent.js").Extent} extent Extent.
@param {import("./size.js").Size} [size] Box pixel size.
@return {number} The resolution at which the provided extent will render at
    the given size.