pub fn pick_left<'a>(&'a self, other: &'a Point2D) -> &'a Point2D {
        //when both the points are same, return the other point
        if self == other {
            return other;
        } else if self.y != other.y {
            // else return the point with min y-coordinate
            if self.y < other.y {
                return self;
            } else {
                return other;
            }
        } else {
            // when y-coordinates are same return the point with min x-coordinate
            if self.x < other.x {
                return self;
            } else {
                return other;
            }
        }
    }
///Comparision of point position relative to another point
///
///Given two points we need to left most point.
/// This is used to find the pivot point of the vertex point
/// of the hull.
Comparision of point position relative to another point
Given two points we need to left most point.
This is used to find the pivot point of the vertex point
of the hull.
Comparision of point position relative to another point Given two points we need to left most point . This is used to find the pivot point of the vertex point of the hull .
pub fn pick_left<'a>(&'a self, other: &'a Point2D) -> &'a Point2D {
        //when both the points are same, return the other point
        if self == other {
            return other;
        } else if self.y != other.y {
            // else return the point with min y-coordinate
            if self.y < other.y {
                return self;
            } else {
                return other;
            }
        } else {
            // when y-coordinates are same return the point with min x-coordinate
            if self.x < other.x {
                return self;
            } else {
                return other;
            }
        }
    }
pub fn pick_left < ' a > ( & ' a self , other : & ' a Point2D ) -> & ' a Point2D { //when both the points are same, return the other point if self == other { return other ; } else if self . y != other . y { // else return the point with min y-coordinate if self . y < other . y { return self ; } else { return other ; } } else { // when y-coordinates are same return the point with min x-coordinate if self . x < other . x { return self ; } else { return other ; } } }
Comparision of point position relative to another point
Given two points we need to left most point.
Comparision of point position relative to another point Given two points we need to left most point .
&'a self
other
&'a Point2D
&'a self
other
&'a Point2D