Skip to content

Commit

Permalink
Fix start and finish data
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfercher committed Sep 10, 2023
1 parent 8b20082 commit 5f508f3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/internal/rrt.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,14 @@ func (r *RapidlyExploringRandomTrees[T]) drawInterestPoints(start *math.Coordina

func (r *RapidlyExploringRandomTrees[T]) findPath(start *math.Coordinate, finish *math.Coordinate, world [][]T) (int, *tree.Tree[*math.Point[T]]) {
r.StartPoint = &math.Point[T]{
X: start.X,
Y: start.Y,
X: start.X,
Y: start.Y,
Data: world[int(start.X)][int(start.Y)],
}
r.FinishPoint = &math.Point[T]{
X: finish.X,
Y: finish.Y,
X: finish.X,
Y: finish.Y,
Data: world[int(finish.X)][int(finish.Y)],
}

nodes := make(map[string]*tree.Node[*math.Point[T]])
Expand Down

0 comments on commit 5f508f3

Please sign in to comment.