Correct the rotation matrix and use sinpi/cospi.