Guest: Given a length of a line, and a rotation degree, what is the length of the axis-aligned bounding box for the rotated line ?
That is just a trickily worded trig question.
It is really an interval that is being rotated. Let the interval be h units long.
Draw the interval on a co-ordinate plane (in the 1'st quadrant, where x and y are both positive) such that it starts at (0,0) and it is rotated about the x axis.
Now drop a perpendicular down from the end of the line so that it intersects with the x axis.
Put theta where it belongs in the triangle that you now should see before you.
do you see why I told you to make the interval h units long?
Can you take it from here?