func Float64ArrayDeDup(a []float64) []float64 {
	keys := make(map[float64]bool)
	list := []float64{}
	for _, entry := range a {
		if _, value := keys[entry]; !value {
			keys[entry] = true
			list = append(list, entry)
		}
	}
	return list
}
removes any duplicates from the array
order may or may not be maintained
package bezier
import "math"
const MaxInt = int(^uint(0) >> 1)
const MinInt = -MaxInt - 1
func Distance(p1 Point, p2 Point) float64 {
	x := p1.X - p2.X
	y := p1.Y - p2.Y
	return math.Sqrt((x * x) + (y * y))
}