changed the call from 6 doubles to two vectors of position and directions (X,Y,Z = pos1[3]) and (a,b,c = vec1[3])
added two simple tests - one for parallel and one for cross-section.
there is also a case where NaN is returned, not tested