So I've taken 2 Trigonometry classes, but it was a long time ago. I've been pouring over my old book for a week now, and although a lot has come back, I still don't have a complete grasp of what's happening here. I can't remember doing anything like this in class...

This is code from "Programming Windows", where we are rotating points around a circle (like a unit circle, with a four quadrant graph):

I was hoping someone could help me identify the theorems (or principals or whatever) being used? Or if there is a name for what's happening? It would help me in researching it.Code:for( i = 0; i < iNum; i++ ) { ptTemp.x = (int)( pt[i].x * cos( TWOPI * iAngle / 360 ) + pt[i].y * sin( TWOPI * iAngle / 360 ) ); ptTemp.y = (int)( pt[i].y * cos( TWOPI * iAngle / 360 ) - pt[i].x * sin( TWOPI * iAngle / 360 ) ); pt[i] = ptTemp; }

Thanks!