From 871ac714ba93d40fde1ea4746079bbe164c439bd Mon Sep 17 00:00:00 2001 From: Justin Young Date: Fri, 2 May 2025 18:29:55 -0400 Subject: [PATCH] cleaned up Astart documentation --- site/docs/09-math/07-graph.mdx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/site/docs/09-math/07-graph.mdx b/site/docs/09-math/07-graph.mdx index cd67070d..acec46b8 100644 --- a/site/docs/09-math/07-graph.mdx +++ b/site/docs/09-math/07-graph.mdx @@ -149,6 +149,11 @@ const dijkstraAnalysis = graph.dijkstra(nodeA); Find the shortest path using spatial information for better performance: +```ts +const aStarResults = graph.astar(nodeA, nodeB); +``` +Returns an object with a list of nodes representing the path, a number representing the number of node steps required, the overall distance traversed, and if any nodes were skipped due to them not being PositionNodes. + ## Other Features ### Building a Graph from Data Arrays -- 2.51.2