Deriving 2D Coordinate Rotation Formula I'm trying to write out the steps in code for deriving the 2D coordinate rotation formula so I can understand it.
x = radius * cos(angle)
y = radius * sin(angle)
x1 = radius * cos(angle + -rotation)
y1 = radius * sin(angle +  rotation)

So,
x1 = radius * cos(angle) * cos(rotation) – radius * sin(angle) * sin(rotation)
y1 = radius * sin(angle) * cos(rotation) + radius * cos(angle) * sin(rotation)

Therefore,
x1 = cos(rotation) * x – sin(rotation) * y
y1 = cos(rotation) * y + sin(rotation) * x

I hate to post a question just asking "Is this right?", but is this right? In particular, I'm unsure if I'm correctly representing the w (as listed in the link) in the first x1 and y1 assignment, and it's expansion. And no, this isn't homework. Thanks.

It's okay, just a minor detail in the initial formulation (the first four lines):
x1 = radius * cos(angle + -rotation)

Should be:
x1 = radius * cos(angle + rotation)

(No minus sign, the angle is added in both cases)
By the way, I can understand your doubts. The link you posted first names the rotation angle w and then f. They should have stuck with w or given it a significant name like you did
