geometry: add feature
geometry: add feature: a task in smol-software-harbor (Harbor dataset). Add is convex(points) to geometry/polygon.py : given the vertices of a simple polygon in order (either orientation), return True if the polygon is convex and False otherwise. Collinear consecutive vertices (a point in the…
The task
Add `is_convex(points)` to `geometry/polygon.py`: given the vertices of a simple polygon in order (either orientation), return `True` if the polygon is convex and `False` otherwise. Collinear consecutive vertices (a point in the middle of an edge) do not make a polygon concave. Run `python3 -m pytest -q`.
Part of efederici/smol-software-harbor.