// // Given one of the fixed endpoints on this segment, return a congruent segment with the: fixed endpoint and the other point being moved. // public Segment GetOppositeSegment(Point pt) { if (!HasPoint(pt)) { return(null); } Point fixedPt = pt; Point variablePt = this.OtherPoint(pt); Point vector = Point.MakeVector(fixedPt, variablePt); Point opp = Point.GetOppositeVector(vector); // 'Move' the vector to begin at its starting point: pt return(new Segment(pt, new Point("", pt.X + opp.X, pt.Y + opp.Y))); }