35 : EndpointA(PntA), VecAtoB(PntB-PntA)
44 G4double sq_VecAZ, inner_prod, unit_projection ;
47 sq_VecAZ = VecAZ.
mag2();
58 if( (0. <= unit_projection ) && (unit_projection <= 1.0 ) )
60 dist_sq= sq_VecAZ - unit_projection * inner_prod ;
67 if( unit_projection < 0. )
75 dist_sq = VecBZ.
mag2();
83 if( dist_sq < 0.0 ) dist_sq = 0.0 ;
85 return std::sqrt(dist_sq) ;