Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Infinity = math.Inf(1)
Functions ¶
Types ¶
type NeighborsFunc ¶
neighbor points given a point x,y
type Path ¶
func FindPath ¶
func FindPath(start image.Point, end image.Point, maxPath float64, tileCost TileCostFunc, neighbors NeighborsFunc, samePoint PointEqFunc) (Path, bool)
returns an array of points that is the shortest/cheapest path from start->end and true, or false if no such path exists * basically djikstra's shortest path algorithm
type PointEqFunc ¶
compare two points for equality. notably this should handle wrapping around the map
Click to show internal directories.
Click to hide internal directories.