matrix.rotation: handle 360 degree and relatives