mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-23 09:28:58 +02:00
cameo/area.c (hit_segment): clean up entry/exit handling
This commit is contained in:
parent
d79424d9ae
commit
ebcdfd52ca
@ -167,9 +167,8 @@ static int hit_segment(double fx, double fy, double tx, double ty,
|
|||||||
dx = b->x-a->x;
|
dx = b->x-a->x;
|
||||||
dy = b->y-a->y;
|
dy = b->y-a->y;
|
||||||
|
|
||||||
if (enter && dy < 0)
|
/* -dy becomes the x component of the normal vector */
|
||||||
return 0;
|
if (enter ? dy < 0 : dy > 0)
|
||||||
if (!enter && dy > 0)
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
d = hypot(dx, dy);
|
d = hypot(dx, dy);
|
||||||
|
Loading…
Reference in New Issue
Block a user