diff --git a/matGeom/geom2d/clipRay.m b/matGeom/geom2d/clipRay.m index 8650b2a6..043952ab 100644 --- a/matGeom/geom2d/clipRay.m +++ b/matGeom/geom2d/clipRay.m @@ -20,7 +20,7 @@ % ------ % Author: David Legland -% e-mail: david.legland@inra.fr +% e-mail: david.legland@inrae.fr % Created: 2010-05-13, using Matlab 7.4.0.287 (R2007a) % Copyright 2010 INRA - Cepia Software Platform. @@ -44,8 +44,8 @@ inds = find(isfinite(edge(:, 1))); % compute position of edge extremities relative to the ray -pos1 = linePosition(edge(inds,1:2), ray(inds,:)); -pos2 = linePosition(edge(inds,3:4), ray(inds,:)); +pos1 = linePosition(edge(inds,1:2), ray(inds,:), 'diag'); +pos2 = linePosition(edge(inds,3:4), ray(inds,:), 'diag'); % if first point is before ray origin, replace by origin edge(inds(pos1 < 0), 1:2) = ray(inds(pos1 < 0), 1:2);