Skip to content

Commit

Permalink
Merge pull request #874 from tpersson/fixInDefLoopApperture
Browse files Browse the repository at this point in the history
Prevents indefinite loop when aperture is on 0.
  • Loading branch information
madcern committed Mar 3, 2020
2 parents d0625c2 + 9c5c3b8 commit 0827b01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mad_aper.c
Expand Up @@ -1149,7 +1149,7 @@ aper_calc(double p, double q, double* minhl,
if ( // not parallel lines
0 != aper_intersect(a1, b1, c1, a2, b2, c2, &xm, &ym)
// intersection point is inside the bounding box
&& ( xm < bbxmax && xm > bbxmin && ym < bbymax && ym > bbymin)
&& ( xm <= bbxmax && xm >= bbxmin && ym <= bbymax && ym >= bbymin)
// intersection point is inside pipe line segment
&& 0 != aper_on_line(xm, ym, pipex[i], pipey[i], pipex[i+1], pipey[i+1], dist_limit)
// halo center is not inside segement defined by halo apex and intersection point
Expand Down

0 comments on commit 0827b01

Please sign in to comment.