def compareDistanceFromCenter(self, other):
 distanceFromCenter = abs(self.yMinusCenter)
 distanceFromCenterOther = abs(other.yMinusCenter)
 if (distanceFromCenter > distanceFromCenterOther):
  return 1
 if (distanceFromCenter < distanceFromCenterOther):
  return (-1)
 return 0

def compareDistanceFromCenter ( self , other ) : distanceFromCenter = abs ( self . yMinusCenter ) distanceFromCenterOther = abs ( other . yMinusCenter ) if ( distanceFromCenter > distanceFromCenterOther ) : return 1 if ( distanceFromCenter < distanceFromCenterOther ) : return ( - 1 ) return 0
get comparison in order to sort y intersections in ascending order of distance from the center .