Почему ошибка sagemention в этом коде ?
int test_polygon(struct Polygon* poly, struct Pointf target) // mathematical algorithm to know whether the point is inside the polygon. { int i, j, c=0; // new variables will be used in the next for loop. for (i =0,j=poly->nvert-1 ; i < poly->nvert ; j = i++) // for (i=0,j=Number of vertices-1 ; i < Number of vertices ; j=i++) { if ((( poly->p[i].y > target.y) != (poly->p[j].y > target.y)) && //poly.p[i].y is y-coordinate of the polygon's vertices. (target.x < (poly->p[j].x - poly->p[i].x) * (target.y - poly->p[i].y) / //poly.p[i].x is x-coordinate of the polygon's vertices. (poly->p[j].y - poly->p[i].y) + poly->p[i].x)) c = !c; } return c; }
Что я уже пробовал:
я изменил структуру на указатели , но у меня есть та же ошибка sagemention.