public bool edge_exists(edge2d other) { edge2d edge_1 = new edge2d(-1, this.vertices[0], this.vertices[1]); edge2d edge_2 = new edge2d(-1, this.vertices[1], this.vertices[2]); edge2d edge_3 = new edge2d(-1, this.vertices[2], this.vertices[0]); if (edge_1.Equals_without_orientation(other) == true || edge_2.Equals_without_orientation(other) == true || edge_3.Equals_without_orientation(other) == true) { return(true); } return(false); }
public bool Equals(edge2d other) { return(other.start_pt.Equals(this._start_pt) && other.end_pt.Equals(this._end_pt)); }
public bool Equals_without_orientation(edge2d other) { return(other.start_pt.Equals(this._start_pt) && other.end_pt.Equals(this._end_pt) || other.start_pt.Equals(this._end_pt) && other.end_pt.Equals(this._start_pt)); }