int InsidePolygon(XY *polygon,int n,XY p) { int i; double angle=0; XY p1,p2; for (i=0;i PI) dtheta -= TWOPI; while (dtheta < -PI) dtheta += TWOPI; return(dtheta); }