def getSegmentFromPoints(begin, end):
 endpointFirst = Endpoint()
 endpointSecond = Endpoint().getFromOtherPoint(endpointFirst, end)
 endpointFirst.getFromOtherPoint(endpointSecond, begin)
 return (endpointFirst, endpointSecond)

def getSegmentFromPoints ( begin , end ) : endpointFirst = Endpoint ( ) endpointSecond = Endpoint ( ) . getFromOtherPoint ( endpointFirst , end ) endpointFirst . getFromOtherPoint ( endpointSecond , begin ) return ( endpointFirst , endpointSecond )
get endpoint segment from a pair of points .