You are on page 1of 1

Void rotar (float angulo)

{
int xTmp,Xf,Yf
double costheta,sentheta,radian;
if(!listX.empty())
{
radian = radianes(angulo);
costheta = cos(radian);
sentheta = sin(radian);
puntomedio(Xf,Yf);
list<int>::iterator itx = listX.begin();
list<int>::iterator ity = listy.begin();
while(itX!=listX.end())
{
xTmp = *itX
*itX = (list)(Xf + ( xTmp - Xf ) * costheta - ( *itY - Y
f ) * sentheta);
*itY = (list)(Yf + ( xTmp - Xf ) * sentheta - ( *itY - Y
f ) * costheta);
*itX++;
*itY++;
}
}
}

You might also like