masks: keep rotation angle of ellipse within [0, 360]