summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-06-10 10:46:35 +0200
committerGitHub <noreply@github.com>2020-06-10 10:46:35 +0200
commit47f1faf51253fc6b004ee19d5c55760a634a534b (patch)
tree8277b5e0ffd9b28905b2a51ec311ed7ed50bea7d /doc/classes
parenta7d0ed97257d06cccea054db554f367cbe58fbb2 (diff)
parent187ba4c5a884aaecd97febcdfaaa76466820be07 (diff)
Merge pull request #39409 from akien-mga/astar-get_closest_point-deterministic
AStar: Make get_closest_point() deterministic for equidistant points
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/AStar.xml3
-rw-r--r--doc/classes/AStar2D.xml3
2 files changed, 4 insertions, 2 deletions
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index e930abba87..2695e86f47 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -131,7 +131,8 @@
<argument index="1" name="include_disabled" type="bool" default="false">
</argument>
<description>
- Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns -1 if there are no points in the points pool.
+ Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool.
+ [b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result.
</description>
</method>
<method name="get_closest_position_in_segment" qualifiers="const">
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index 16fa05041e..622d336ef6 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -114,7 +114,8 @@
<argument index="1" name="include_disabled" type="bool" default="false">
</argument>
<description>
- Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns -1 if there are no points in the points pool.
+ Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool.
+ [b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result.
</description>
</method>
<method name="get_closest_position_in_segment" qualifiers="const">