def getDistanceToLine(begin, end, point):
 pointMinusBegin = (point - begin)
 if (begin == end):
  return abs(pointMinusBegin)
 endMinusBegin = (end - begin)
 return (abs(endMinusBegin.cross(pointMinusBegin)) / abs(endMinusBegin))

def getDistanceToLine ( begin , end , point ) : pointMinusBegin = ( point - begin ) if ( begin == end ) : return abs ( pointMinusBegin ) endMinusBegin = ( end - begin ) return ( abs ( endMinusBegin . cross ( pointMinusBegin ) ) / abs ( endMinusBegin ) )
get the distance from a vector3 point to an infinite line .