Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我在 2D 空间中有四个点,然后旋转 m 度,那么确定旋转方向(顺时针/逆时针)的最佳/最有效方法是什么。
我知道旋转前后哪个点。
我尝试考虑最低点和最高点(基于 y 值)并比较 x 差异,例如(+ve 或 -ve),但这似乎不是很可靠,我怀疑这是一个有效的解决方案。
如果您同时拥有前后坐标,任何点都可以。将之前的叉积带入之后。合成向量的符号将告诉您顺时针 (-) 或逆时针 (+)。
你知道哪一点是哪一点吗?如果你这样做,使用其中之一就足够了