question: public static CGPoint ccpRotateByAngle ( CGPoint v , CGPoint pivot , float angle ) { CGPoint r = ccpSub ( v , pivot ) ; float t = r . x ; float cosa = ( float ) Math . cos ( angle ) ; float sina = ( float ) Math . sin ( angle ) ; r . x = t * cosa - r . y * sina ; r . y = t * sina + r . y * cosa ; r = ccpAdd ( r , pivot ) ; return r ; }
target:  Rotates a point counter clockwise by the angle around a pivot