static int x, y;
int next;
next = (cur + 1) % psize;
- if (IS_CENTER (points[next].x, points[next].y, rect.x, rect.y) || cur == -1)
+ if ((points[next].x == rect.x && points[next].y == rect.y) || cur == -1)
{
cur = next;
next = (cur + 1) % psize;
x = x1;
y = y1;
}
- rect.x = (swap ? y : x) - WIDTH/2;
- rect.y = (swap ? x : y) - HEIGHT/2;
+ rect.x = (swap ? y : x);
+ rect.y = (swap ? x : y);
(x2 < x1) ? x-- : x++;
err += ABS (inc);
if (err >= ABS (thre))