Mercurial > hg > octave-lyh
diff scripts/geometry/inpolygon.m @ 8507:cadc73247d65
style fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 13 Jan 2009 14:08:36 -0500 |
parents | eb7bdde776f2 |
children | eb63fbe60fab |
line wrap: on
line diff
--- a/scripts/geometry/inpolygon.m +++ b/scripts/geometry/inpolygon.m @@ -67,15 +67,15 @@ ## ## is Y between the y-values of edge i,j ## AND (X,Y) on the left of the edge ? - idx1 = ((yv(i) <= Y & Y < yv(j)) | (yv(j) <= Y & Y < yv(i)) ) & ... - 0 < distance.*delta_yv; + idx1 = (((yv(i) <= Y & Y < yv(j)) | (yv(j) <= Y & Y < yv(i))) + & 0 < distance.*delta_yv); IN (idx1) = !IN (idx1); ## Check if (X,Y) are actually ON the boundary of the polygon. if (do_boundary) - idx2 = ((yv(i) <= Y & Y <= yv(j)) | (yv(j) <= Y & Y <= yv(i))) & ... - ((xv(i) <= X & X <= xv(j)) | (xv(j) <= X & X <= xv(i))) & ... - (0 == distance | !delta_xv); + idx2 = (((yv(i) <= Y & Y <= yv(j)) | (yv(j) <= Y & Y <= yv(i))) + & ((xv(i) <= X & X <= xv(j)) | (xv(j) <= X & X <= xv(i))) + & (0 == distance | !delta_xv)); ON (idx2) = true; endif j = i;