From my experiments, the angle returned by RotatedRect\'s angle variable goes from -90 to 0 degrees, which is not sufficient to determine if the object is leaned to the left
Switching values of width and height of rectangle is the same as rotating it by 90 degrees. So if the range of angles was 180 degrees instead of 90 than same rectangle would have 2 representations (width, height, angle) and (height, width, angle+90). Having range of 90 degrees you can represent every rectangle and you can do that in only one way.