Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

旋转算法 #2

Open
zhangliangming opened this issue Jul 25, 2017 · 0 comments
Open

旋转算法 #2

zhangliangming opened this issue Jul 25, 2017 · 0 comments

Comments

@zhangliangming
Copy link

我觉得项目实在太复杂了,其实我觉得可以简单化。
下面是我的一些简单的想法
酷狗的中心旋转点,应该是在X= width * 0.5f,Y = height * 1.5f。然后根据第一次的触摸点,计算触摸点与旋转中心的夹角角度 A(如果角度为负数,则A = A+180),同理再计算最后一次的触摸点与旋转中心的夹角角度 B(如果角度为负数,则B = B+180)。最后,计算旋转的角度 D = B - A。即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant