Date:2012-03-20 23:18:08 (11 years 11 months ago)
Author:Werner Almesberger
Commit:ebcdfd52ca5a725b35bf6cb7a6903377a5dca899
Message:cameo/area.c (hit_segment): clean up entry/exit handling

Files: cameo/area.c (1 diff)

Change Details

cameo/area.c
167167    dx = b->x-a->x;
168168    dy = b->y-a->y;
169169
170    if (enter && dy < 0)
171        return 0;
172    if (!enter && dy > 0)
170    /* -dy becomes the x component of the normal vector */
171    if (enter ? dy < 0 : dy > 0)
173172        return 0;
174173
175174    d = hypot(dx, dy);

Archive Download the corresponding diff file

Branches:
master



interactive