Skip to content

Commit

Permalink
Complete 'find_intersections' function
Browse files Browse the repository at this point in the history
  • Loading branch information
lycantropos committed Feb 6, 2020
1 parent dff9eee commit e6726e1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bentley_ottmann/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ def find_intersections(first_segment: Segment, second_segment: Segment
) -> Union[Tuple[()], Tuple[Point],
Tuple[Point, Point]]:
are_real_segments = _is_real_segment(first_segment)
if not are_real_segments:
first_segment_real, second_segment_real = (
_to_real_segment(first_segment), _to_real_segment(second_segment))
else:
first_segment_real, second_segment_real = first_segment, second_segment
first_segment_real, second_segment_real = (
(first_segment, second_segment)
if are_real_segments
else (_to_real_segment(first_segment),
_to_real_segment(second_segment)))
relationship = to_segments_relationship(first_segment_real,
second_segment_real)
if relationship is SegmentsRelationship.NONE:
Expand Down

0 comments on commit e6726e1

Please sign in to comment.