The Math behind Rotating Attention