62,614
社区成员
发帖
与我相关
我的任务
分享
/*
旋转点操作
@param center 旋转中心
@param point 操作点
@param angle 旋转角度
@return FPoint 返回旋转后的点
*/
FPoint CShape::RotatePoint(FPoint center, FPoint point, double angle)
{
FPoint Circumpt;
Circumpt.x = cos(angle) * (point.x - center.x) + sin(angle) * (center.y - point.y) + center.x;
Circumpt.y = center.y - sin(angle) * (center.x-point.x) - cos(angle) * (center.y - point.y);
return Circumpt;
}