points

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Area

func Area(pts []maths.Pt) (a float64)

func Centroid

func Centroid(pts []maths.Pt) (center maths.Pt)

func Paired

func Paired(pts []maths.Pt) ([][2]maths.Pt, error)

func Reverse

func Reverse(a []maths.Pt) []maths.Pt

func RotatePos

func RotatePos(pts []maths.Pt, pos int)

func RotateToLowestsFirst

func RotateToLowestsFirst(pts []maths.Pt)

func SinArea

func SinArea(pts []maths.Pt) (a float64)

func SlopeIntercept

func SlopeIntercept(pt1, pt2 maths.Pt) (m, b float64, defined bool)

func SortAndUnique

func SortAndUnique(pts []maths.Pt) []maths.Pt

SortAndUnique sorts the points using the X first then Y ordering and removes duplicates.

Types

type ByXY

type ByXY []maths.Pt

func (ByXY) Len

func (t ByXY) Len() int

func (ByXY) Less

func (t ByXY) Less(i, j int) bool

func (ByXY) Sort

func (t ByXY) Sort()

func (ByXY) Swap

func (t ByXY) Swap(i, j int)

Jump to

Keyboard shortcuts

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