def addXIntersectionIndexesFromSegments(index, segments, xIntersectionIndexList):
 for segment in segments:
  addXIntersectionIndexesFromSegment(index, segment, xIntersectionIndexList)

def addXIntersectionIndexesFromSegments ( index , segments , xIntersectionIndexList ) : for segment in segments : addXIntersectionIndexesFromSegment ( index , segment , xIntersectionIndexList )
add the x intersection indexes from the segments .