function [ hv ] = Heavysidestep( x, y, z, x1, y1, z1, delta)
% 
%This function calculates the Heavisidestepfuction 
%
% function [ hv ] = Heavysidestep(x,y,z,x1,y1,z1,delta )
%
% hv               	resulting value due to the Inputs
% x                 values for the x-direction
% y                 values for the y-direction
% z                 values for the z-direction
% x1                values for the second radius
% y1                values for the second radius
% z1                values for the second radius
% delta             small reference value

%% Declear values
% r    length between the two input positions
% d    comparison value between r and delta

r = sqrt(((x-x1).^2)+((y-y1).^2)+((z-z1).^2));
d = r-delta;

%% Calculation

if d<0 
    hv = 0;


elseif d == 0
    hv = 0.5;

else 
    hv = 1;
end

end


