| Copyright | (C) Frank Staals David Himmelstrup |
|---|---|
| License | see the LICENSE file |
| Maintainer | David Himmelstrup |
| Safe Haskell | None |
| Language | Haskell2010 |
Algorithms.Geometry.LineSegmentIntersection.BooleanSweep
Description
\( O(n \log n) \) algorithm for determining if any two line segments overlap.
Shamos and Hoey.
Synopsis
- hasIntersections :: (Ord r, Num r) => [LineSegment 2 p r] -> Bool
- segmentsOverlap :: (Num r, Ord r) => LineSegment 2 p r -> LineSegment 2 p r -> Bool
Documentation
hasIntersections :: (Ord r, Num r) => [LineSegment 2 p r] -> Bool Source #
Tests if there are any intersections.
\(O(n\log n)\)
segmentsOverlap :: (Num r, Ord r) => LineSegment 2 p r -> LineSegment 2 p r -> Bool Source #