Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions hull.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ func cross2D(p, a, b Point) float64 {
}

// ConvexHull returns the convex hull of the provided points.
//
// Algorithm Implementation: Andrew's monotone chain convex hull algorithm.
//
// See: https://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain
func ConvexHull(points []Point) []Point {
// copy points
pointsCopy := make([]Point, len(points))
Expand Down