Documentation ¶
Overview ¶
Package upath implements operations on slices of image.Points.
Index ¶
- func Distance(start, end image.Point) float64
- func DistanceToLine(point, line1, line2 image.Point) float64
- func Lerp(fac float64, start, end []image.Point) []image.Point
- func MultiLerp(fac float64, stages ...[]image.Point) []image.Point
- func P(data ...int) []image.Point
- func Translate(delta image.Point, path []image.Point)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DistanceToLine ¶
DistanceToLine calculates the distance from a point to a line which passes through points line1 and line2.
func Lerp ¶
Lerp linearally interpolates between two paths. If the paths differ in length, the returned path will only be as long as the smaller one. This function will always return a new slice.
func MultiLerp ¶
MultiLerp is like Lerp, but interpolates through several "stages". This function will always return a new slice. If no stages are provided, it will return nil.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.