function distance = dist2d(x1, y1, x2, y2)

% dist2d(x1, y1, x2, y2) -- compute 2-D distances.
%
% A two-dimensional distance computation algorithm.
% Given any set of X's and Y's (in paired order, x1, y1, then x2, y2), this
% function will tell you the 2-D distance between the two. 

distance = sqrt( (x1 -x2)^2 + (y1 - y2)^2 );



