convexHull

package
v0.0.0-...-0f37b7f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package convexHull provides an algotithm for finding a convex hull from a set of point. Implemented algorithm: https://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Point

type Point struct {
	X, Y int
}

Point is a struct that holds the X Y cooridinates of a specific point in the Ecliden plane or space.

type Points

type Points []Point

Points is a slice built up of Point structs.

func (Points) Len

func (points Points) Len() int

func (Points) Less

func (points Points) Less(i, j int) bool

lets sort our Points by x and, if equal, by y

func (Points) Swap

func (points Points) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL