Skip to content

Commit

Permalink
Complete docstring for 'edges_intersect' function
Browse files Browse the repository at this point in the history
  • Loading branch information
lycantropos committed Jan 31, 2020
1 parent e1cb168 commit 423c192
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bentley_ottmann/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,17 @@ def edges_intersect(vertices: Sequence[Point],
for floating point numbers.
:returns: true if polygon is self-intersecting, false otherwise.
.. note::
Consecutive equal vertices like ``(2., 0.)`` in
.. code-block:: python
[(0., 0.), (2., 0.), (2., 0.), (2., 2.)]
will be considered as self-intersection,
if you don't want them to be treated as such
-- filter out before passing as argument.
>>> edges_intersect([(0., 0.), (2., 0.), (2., 2.)])
False
>>> edges_intersect([(0., 0.), (2., 0.), (1., 0.)])
Expand Down

0 comments on commit 423c192

Please sign in to comment.