function d = segdist(r1,c1,r2,c2)
%
% segdist - row distance between segments (if same segment, set HUGE)
% On input:
%     r1,c1: row, col of segment 1 center
%     r2,c2: row, col of segment 2 center
% On output:
%     d: row distance
% Call:
%     d = segdist(r1,c1,r2,c2)
%
d = abs(r1-r2);
if (r1==r2) & (c1==c2)
  d = 100000000;
end;
