calculateCenterRotate(rotation, anchor) {
    let center;
    const currentCenter = this.getCenterInternal();
    if (currentCenter !== undefined) {
      center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]];
      rotateCoordinate(center, rotation - this.getRotation());
      addCoordinate(center, anchor);
    }
    return center;
  }
@param {number} rotation Target rotation.
@param {import("./coordinate.js").Coordinate} anchor Rotation anchor.
@return {import("./coordinate.js").Coordinate|undefined} Center for rotation and anchor.