2010/03/16
주어진 각도로 회전 된 포인트 구하기
// Positive - Counter clock wise
// Negative - Clock wise
void CalcRotatedPoint(double x, double y, double fAngle, double& x2, double& y2)
{
double pi = 3.1415926535;
x2 = cos(fAngle * pi / 180.0f) * x - sin(fAngle * pi / 180.0f) * y;
y2 = sin(fAngle * pi / 180.0f) * x + cos(fAngle * pi / 180.0f) * y;
}
Labels:
Rotate
,
TistoryOldPost
,
회전
,
회전공식
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment