Why the reported angle of a rotated part can flip
A fitted rectangle expresses a boundary through side lengths and an angle. A width-height swap or wrap across the chosen angle convention can cause a discontinuity in reported values.
How to test it
Rotate one sample in known increments across the convention boundary. Keep the side lengths, reported angle, and an orientation mark so downstream interpretations can be checked.

ZHILIANHAI