def addXIntersectionIndexesFromSegment(index, segment, xIntersectionIndexList):
 for endpoint in segment:
  xIntersectionIndexList.append(XIntersectionIndex(index, endpoint.point.real))

def addXIntersectionIndexesFromSegment ( index , segment , xIntersectionIndexList ) : for endpoint in segment : xIntersectionIndexList . append ( XIntersectionIndex ( index , endpoint . point . real ) )
add the x intersection indexes from the segment .