determine the angle by which the mirror should be rotated