aboutsummaryrefslogtreecommitdiff
path: root/path.h
diff options
context:
space:
mode:
authorKirill Petrashin <kirill8201@yandex.ru>2026-04-22 20:48:27 +0300
committerKirill Petrashin <kirill8201@yandex.ru>2026-04-22 20:48:27 +0300
commit55b10d144a6855791f3918f37ccdf36fd8109e58 (patch)
tree788897d35fe3eec8751a3fd4c3958941126d8709 /path.h
parent1cd0a30593d9b7805752e3e183c93f622211ed0b (diff)
downloadastar-55b10d144a6855791f3918f37ccdf36fd8109e58.tar.xz
Add a path_reverse() function
Diffstat (limited to 'path.h')
-rw-r--r--path.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/path.h b/path.h
index ea812e8..4a2159f 100644
--- a/path.h
+++ b/path.h
@@ -19,6 +19,8 @@ size_t diagonal_distance(Position a, Position b);
Path path_new(size_t width, size_t height);
void path_free(Path path, size_t height);
+/* Reverses the path in place and switches start and end */
+void path_reverse(Path *path, size_t width, size_t height, Position *start, Position *end);
/* Helper funcs for the visited array */
char **visited_new(size_t width, size_t height);