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

PieChart角度计算 #11

Open
bobby-walle opened this issue Nov 30, 2017 · 0 comments
Open

PieChart角度计算 #11

bobby-walle opened this issue Nov 30, 2017 · 0 comments

Comments

@bobby-walle
Copy link

PieChart图形绘制方法中,调用MathHelper的calcArcEndPointXY方法进行角度计算。
在计算过程中将角度转换为弧度,再判断不同象限进行计算,最后得到点的坐标。这里是否可以直接使用角度公式
mPosX = (float) (radius * Math.cos(cirAngle * Math.PI / 180));
mPosY = (float) (radius * Math.sin(cirAngle * Math.PI / 180));
mPointF.x = mPosX;
mPointF.y = mPosY;
这样处理可以不进行角度转弧度,也不需要区分象限

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