Documentation
¶
Overview ¶
package point the smallest unit in this project.
Index ¶
- func QuickSort(data PointList, sortFunc SortFunction)
- func SortCounterRadial(x, y float32) func(*Point, *Point) bool
- func SortDiagonal(p1, p2 *Point) bool
- func SortDiagonal2(p1, p2 *Point) bool
- func SortRadial(x, y float32) func(*Point, *Point) bool
- func SortXY(p1, p2 *Point) bool
- func SortXy(p1, p2 *Point) bool
- func SortYX(p1, p2 *Point) bool
- func SortYx(p1, p2 *Point) bool
- func SortxY(p1, p2 *Point) bool
- func Sortxy(p1, p2 *Point) bool
- func SortyX(p1, p2 *Point) bool
- func Sortyx(p1, p2 *Point) bool
- type Point
- type PointList
- type SortFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QuickSort ¶
func QuickSort(data PointList, sortFunc SortFunction)
Quicksort implementation. This one takes a sorting function instead of asuming that the less than is the only posible ordering. It's recursive, so it may fail for very big datasets
func SortRadial ¶
SortFromRadial Sorts using a tangential from a center point this sorter is different from the rest in that it returns the actual sort as it needs an origin
Types ¶
type Point ¶
type PointList ¶
type PointList []*Point
func (PointList) Polyline ¶
func (ps PointList) Polyline(sortFunc SortFunction) PointList
Polyline define a polyline by ordering an slice of points
type SortFunction ¶
Click to show internal directories.
Click to hide internal directories.