向量 \(\overrightarrow{a} = (x, y)\) 顺时针旋转 \(\alpha\) 得到的向量的坐标为 \((x', y')\)
\(x' = \sin \alpha * y + cos \alpha * x, y' = cos \alpha * y - \sin \alpha * x\)
\(\overrightarrow{a} = (\cos \beta, \sin \beta)\)
旋转后
\(\overrightarrow{a} = [\cos (\alpha - \beta), \sin (\alpha - \beta)]\)
将坐标展开得到
\(\overrightarrow{a} = (\cos \alpha \cos \beta + \sin \alpha \sin \beta, \sin \alpha \cos\beta - \cos\alpha \sin\beta)\)
从而
\(x' = \sin \alpha * y + cos \alpha * x, y' = cos \alpha * y - \sin \alpha * x\)