Here it is:

Cursor.Rotate(0, Trunc((CameraYaw+Pi/4)*2/Pi)*Pi/2, 0);

CameraYaw is the angle of the camera over the Y-axis, that is rotating around the cursor.