Manual Rotation (i.e without glRotatef)

I can’t figure out how to manually rotate each vertex of a 2d rectangle about the center of the shape.

Would anybody be able to give me some advice or a clue? Thanks in advance.

nevermind figured it out