我试图更好地理解这段代码到底在做什么。它是用 Objective-C 编写的,但任何有 C 背景的人都应该熟悉它。sin/cos 数学到底在做什么?另外,有没有人有很好的建议来学习诸如此类的游戏概念的三角学?
for (int i = 0; i < GAME_CIRCLES; i++)
{
point.x = center.x - sin (degree) * RADIUS;
point.y = center.y + cos (degree) * RADIUS;
mPieRect[i] = CGRectMakeWithCenter (point, RADIUS - 4);
degree += PI / 3.0;
}