homework_04/06_vladislav_kolev/circle.py
def find_relative_position(self, other_circle):
        """
        Function that finds relative postion of one circle to another
        """
        assert isinstance(other_circle, Circle)

        centers_distance = sqrt((self.center.x_coord - other_circle.center.x_coord)**2
                + (self.center.y_coord - other_circle.center.y_coord)**2)

        if (self.center.x_coord == other_circle.center.x_coord
             and self.center.y_coord == other_circle.center.y_coord
             and self.radius == other_circle.radius):
            return RelativePosition.SAME
        if abs(self.radius - other_circle.radius) < centers_distance \
             <  self.radius + other_circle.radius:
            return RelativePosition.INTERSECTING
        if centers_distance == self.radius + other_circle.radius \
                         or centers_distance == (abs(self.radius - other_circle.radius)):
            return RelativePosition.TOUCHING

        return RelativePosition.NO_COMMON_POINTS

        Function that finds relative postion of one circle to another
        
Function that finds relative postion of one circle to another
Function that finds relative postion of one circle to another
def find_relative_position(self, other_circle):
        assert isinstance(other_circle, Circle)
        centers_distance = sqrt((self.center.x_coord - other_circle.center.x_coord)**2
                + (self.center.y_coord - other_circle.center.y_coord)**2)
        if (self.center.x_coord == other_circle.center.x_coord
             and self.center.y_coord == other_circle.center.y_coord
             and self.radius == other_circle.radius):
            return RelativePosition.SAME
        if abs(self.radius - other_circle.radius) < centers_distance \
             <  self.radius + other_circle.radius:
            return RelativePosition.INTERSECTING
        if centers_distance == self.radius + other_circle.radius \
                         or centers_distance == (abs(self.radius - other_circle.radius)):
            return RelativePosition.TOUCHING
        return RelativePosition.NO_COMMON_POINTS
def find_relative_position ( self , other_circle ) : assert isinstance ( other_circle , Circle ) centers_distance = sqrt ( ( self . center . x_coord - other_circle . center . x_coord ) ** 2 + ( self . center . y_coord - other_circle . center . y_coord ) ** 2 ) if ( self . center . x_coord == other_circle . center . x_coord and self . center . y_coord == other_circle . center . y_coord and self . radius == other_circle . radius ) : return RelativePosition . SAME if abs ( self . radius - other_circle . radius ) < centers_distance < self . radius + other_circle . radius : return RelativePosition . INTERSECTING if centers_distance == self . radius + other_circle . radius or centers_distance == ( abs ( self . radius - other_circle . radius ) ) : return RelativePosition . TOUCHING return RelativePosition . NO_COMMON_POINTS
Function that finds relative postion of one circle to another
Function that finds relative postion of one circle to another
"""
        Function that finds relative postion of one circle to another
        """
self
other_circle