getTileCoordForXYAndResolution_(
    x,
    y,
    resolution,
    reverseIntersectionPolicy,
    opt_tileCoord,
  ) {
    const z = this.getZForResolution(resolution);
    const scale = resolution / this.getResolution(z);
    const origin = this.getOrigin(z);
    const tileSize = toSize(this.getTileSize(z), this.tmpSize_);

    let tileCoordX = (scale * (x - origin[0])) / resolution / tileSize[0];
    let tileCoordY = (scale * (origin[1] - y)) / resolution / tileSize[1];

    if (reverseIntersectionPolicy) {
      tileCoordX = ceil(tileCoordX, DECIMALS) - 1;
      tileCoordY = ceil(tileCoordY, DECIMALS) - 1;
    } else {
      tileCoordX = floor(tileCoordX, DECIMALS);
      tileCoordY = floor(tileCoordY, DECIMALS);
    }

    return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);
  }
Note that this method should not be called for resolutions that correspond
to an integer zoom level.  Instead call the `getTileCoordForXYAndZ_` method.
@param {number} x X.
@param {number} y Y.
@param {number} resolution Resolution (for a non-integer zoom level).
@param {boolean} reverseIntersectionPolicy Instead of letting edge
    intersections go to the higher tile coordinate, let edge intersections
    go to the lower tile coordinate.
@param {import("../tilecoord.js").TileCoord} [opt_tileCoord] Temporary import("../tilecoord.js").TileCoord object.
@return {import("../tilecoord.js").TileCoord} Tile coordinate.
@private