public static bool operator !=(Point Point1, Point Point2) { //if ((Point1.XCoordinate == Point2.XCoordinate) && // (Point1.YCoordinate == Point2.YCoordinate)) // return (false); //else // return (true); return(!Point1.Equals(Point2)); }
public bool SharesEndPoint(LineSegment line, out Point sharedPoint) { if (Point1.Equals(line.Point1) || Point1.Equals(line.Point2)) { sharedPoint = Point1; return(true); } else if (Point2.Equals(line.Point2) || Point2.Equals(line.Point1)) { sharedPoint = Point2; return(true); } sharedPoint = new Point(0, 0); return(false); }
public bool Equals(LineSegment line) { if (Point1.Equals(line.Point1)) { if (Point2.Equals(line.Point2)) { return(true); } } else if (Point1.Equals(line.Point2)) { if (Point2.Equals(line.Point1)) { return(true); } } return(false); }
public Point SharedVertex(Segment s) { if (Point1.Equals(s.Point1)) { return(Point1); } if (Point1.Equals(s.Point2)) { return(Point1); } if (Point2.Equals(s.Point1)) { return(Point2); } if (Point2.Equals(s.Point2)) { return(Point2); } return(null); }
public bool Equals(LineSegment2D other) => Point1.Equals(other.Point1) && Point2.Equals(other.Point2);
public bool Equals(NodeLine other) { return(Point1.Equals(other?.Point1) && Point2.Equals(other?.Point2) || Point2.Equals(other?.Point1) && Point1.Equals(other?.Point2)); }
public bool Equals(Side side) { return((Point1.Equals(side.Point1) && Point2.Equals(side.Point2)) || (Point1.Equals(side.Point2) && Point2.Equals(side.Point1))); }
public bool HasPoint(Point p) { return(Point1.Equals(p) || Point2.Equals(p)); }