function getForViewAndSize(center, resolution, rotation, size, dest) {
  const [x0, y0, x1, y1, x2, y2, x3, y3] = getRotatedViewport(
    center,
    resolution,
    rotation,
    size,
  );
  return createOrUpdate(
    Math.min(x0, x1, x2, x3),
    Math.min(y0, y1, y2, y3),
    Math.max(x0, x1, x2, x3),
    Math.max(y0, y1, y2, y3),
    dest,
  );
}
@param {import("./coordinate.js").Coordinate} center Center.
@param {number} resolution Resolution.
@param {number} rotation Rotation.
@param {import("./size.js").Size} size Size.
@param {Extent} [dest] Destination extent.
@return {Extent} Extent.