Skip to content

Commit

Permalink
Fix data inside point
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfercher committed Sep 9, 2023
1 parent 3bf046f commit cde89dc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/rrt/rrt.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ func (r *RRT[T]) getRandomPoint(world [][]T, goToFinish bool) *Point[T] {
}

return &Point[T]{
X: float64(x),
Y: float64(y),
X: float64(x),
Y: float64(y),
Data: world[x][y],
}
}

Expand All @@ -141,7 +142,8 @@ func (r *RRT[T]) getFixedPoint(minDistancePoint *Point[T], newPoint *Point[T], w

//fmt.Printf("Min %s, New %s, Fix %s\n", minDistancePoint.GetString(), newPoint.GetString(), world[x][y].GetString())
return &Point[T]{
X: float64(x),
Y: float64(y),
X: float64(x),
Y: float64(y),
Data: world[x][y],
}
}

0 comments on commit cde89dc

Please sign in to comment.