// // Do these segments overlay this angle? // public bool IsIncludedAngle(Segment seg1, Segment seg2) { // Do not allow the same segment. if (seg1.StructurallyEquals(seg2)) { return(false); } // Check direct inclusion if (seg1.Equals(ray1) && seg2.Equals(ray2) || seg1.Equals(ray2) && seg2.Equals(ray1)) { return(true); } // Check overlaying angle Point shared = seg1.SharedVertex(seg2); if (shared == null) { return(false); } Angle thatAngle = new Angle(seg1.OtherPoint(shared), shared, seg2.OtherPoint(shared)); return(this.Equates(thatAngle)); }
// Given one of the segments in the pair, return the other public Segment OtherSegment(Segment cs) { if (cs.Equals(cs1)) { return(cs2); } if (cs.Equals(cs2)) { return(cs1); } return(null); }
// Given one of the segments in the pair, return the other public Segment OtherSegment(Segment cs) { if (cs.Equals(cs1)) return cs2; if (cs.Equals(cs2)) return cs1; return null; }
// // Do these segments overlay this angle? // public bool IsIncludedAngle(Segment seg1, Segment seg2) { // Do not allow the same segment. if (seg1.StructurallyEquals(seg2)) return false; // Check direct inclusion if (seg1.Equals(ray1) && seg2.Equals(ray2) || seg1.Equals(ray2) && seg2.Equals(ray1)) return true; // Check overlaying angle Point shared = seg1.SharedVertex(seg2); if (shared == null) return false; Angle thatAngle = new Angle(seg1.OtherPoint(shared), shared, seg2.OtherPoint(shared)); return this.Equates(thatAngle); }