1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #52850 from mashumafi/vector-bsearch

This commit is contained in:
Rémi Verschelde
2021-10-01 07:52:51 +02:00
committed by GitHub
14 changed files with 182 additions and 30 deletions

View File

@@ -44,6 +44,15 @@
Appends a [PackedVector2Array] at the end of this array.
</description>
</method>
<method name="bsearch">
<return type="int" />
<argument index="0" name="value" type="Vector2" />
<argument index="1" name="before" type="bool" default="true" />
<description>
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
<method name="duplicate">
<return type="PackedVector2Array" />
<description>