hgeometry-0.12.0.0: Geometric Algorithms, Data structures, and Data types.
Copyright(C) Frank Staals David Himmelstrup
Licensesee the LICENSE file
MaintainerDavid Himmelstrup
Safe HaskellNone
LanguageHaskell2010

Algorithms.Geometry.LineSegmentIntersection.BooleanSweep

Description

\( O(n \log n) \) algorithm for determining if any two line segments overlap.

Shamos and Hoey.

Synopsis

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 #