static getRectBBox(x, y, width, height, angle) {
    const angleRad = Geometry.normalizeAngle(angle);

    const rotate = (x1, y1) => [
      (x1 - x) * Math.cos(angleRad) - (y1 - y) * Math.sin(angleRad) + x,
      (x1 - x) * Math.sin(angleRad) + (y1 - y) * Math.cos(angleRad) + y,
    ];

    const [rx1, ry1, rx2, ry2] = Geometry.getPointsBBox([
      x,
      y,
      ...rotate(x + width, y),
      ...rotate(x + width, y + height),
      ...rotate(x, y + height),
    ]);

    return { x: rx1, y: ry1, width: rx2 - rx1, height: ry2 - ry1 };
  }
Calculate rotated rect BBox
@param {number} x Top left X
@param {number} y Top left Y
@param {number} width Width
@param {number} height Height
@param {number} angle Angle in RAD
@returns {BBox[]} Dimensions of bounding box