The width and height of the inner rectangle before rotation.
The width and height of the bounding outer rectangle (unrotated).
Clockwise rotation angle in degrees to apply to the inner rectangle.
Negative values are normalized to the [0, 360) range. Defaults to 0.
The unrotated Size (width × height) of the inner rectangle after it has been
clipped to fit within dimOuter at the given rotation.
Computes the largest unrotated size for an inner rectangle such that, when rotated by
rotationdegrees about its own centre, it fits entirely within the outer rectangle.The algorithm centres
dimInnerinsidedimOuter, rotates the inner rectangle, then clips its edges against the four sides of the outer rectangle using line–line intersection. The clipped points are un-rotated and their axis-aligned bounding box is returned.Axis-aligned special cases (0°, 90°, 180°, 270°) are handled analytically and do not go through the intersection path.