zeroHalf::Bool (Optional): The way x = 0 is treated. If this argument is true, the returned value is 0.5 when x = 0, otherwise it is 1. [Default: false].
vals::Vector{Number}: All values from which to pick some.
probs::Vector{Real}: These are the probabilities of each element being picked. It must has as many elements as the "vals" argument. Its elements must lie in the range [0, 1] and their sum must equal 1 (with a tolerance of about 1000 epsilon of Float64).
nVals::Real (Optional): The number of values to return. [Default: 1]
sPts::Matrix{Real}: The 3D position vectors of the starting points. The rows represent points and the columns their Cartesian coordinates [x,y,z] resulting in an Nx3 matrix with N being the number of points.
ePts::Matrix{Real}: The 3D position vectors of the end points. The rows represent points and the columns their Cartesian coordinates [x,y,z] resulting in an Mx3 matrix with M being the number of points.
dist::Matrix{Real}: The distance between each start and end point. This is an NxM matrix where each row corresponds to the distance between the nth start point and each of the M end points.
function twoPtDist(sPts::Matrix{<:Real},ePts::Matrix{<:Real})
# Validate arguments
ifsize(sPts,2)!=3
error("twoPtDist(): Wrong dimensions of the starting point coordinates. This must be an Nx3 matrix where N is the number of points and the columns correspond to the Cartesian coordinates.")
elseifsize(ePts,2)!=3
error("twoPtDist(): Wrong dimensions of the ending point coordinates. This must be an Nx3 matrix where N is the number of points and the columns correspond to the Cartesian coordinates.")