Reverted RotateAngle to old formula

This should solve incontinuities in angle calculations, possibly
fixing the "teleportation bug"