mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-23 04:23:55 +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;
|
||||
dy = b->y-a->y;
|
||||
|
||||
if (enter && dy < 0)
|
||||
return 0;
|
||||
if (!enter && dy > 0)
|
||||
/* -dy becomes the x component of the normal vector */
|
||||
if (enter ? dy < 0 : dy > 0)
|
||||
return 0;
|
||||
|
||||
d = hypot(dx, dy);
|
||||
|
Loading…
Reference in New Issue
Block a user