Skip to content

Commit

Permalink
Complete 'Event.y_at' method
Browse files Browse the repository at this point in the history
  • Loading branch information
lycantropos committed Jun 1, 2020
1 parent 6228c04 commit 840f76a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions bentley_ottmann/core/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,8 @@ def y_at(self, x: Coordinate) -> Coordinate:
_, start_y = self.start
return start_y
else:
start_x, start_y = self.start
if x == start_x:
return start_y
end_x, end_y = self.end
if x == end_x:
return end_y
_, start_y = self.start
_, end_y = self.end
_, result = segments_intersection(self.segment,
((x, start_y), (x, end_y)))
return result

0 comments on commit 840f76a

Please sign in to comment.