function c = BoxIntercept(u,v,BoxWidth,BoxLength1, BoxLength2)
%Compute the coordinates of the intercept of a box surface and the line conecting two points
%intercept point is c, k is vector connecting points, n is distance along k that c is located

%Check if box is between vectors u and v
if (inBox(u,BoxWidth,BoxLength1, BoxLength2) & ~inBox(v,BoxWidth,BoxLength1, BoxLength2))
   %OK to compute intercept
   c = u; %approximatly correct for small steps.
else
   c = [0;0;0];
end
