diff options
author | mashumafi <mashumafi@gmail.com> | 2021-09-19 18:13:09 +0000 |
---|---|---|
committer | mashumafi <mashumafi@gmail.com> | 2021-09-30 23:57:26 +0000 |
commit | 214bbfbefed2ae97bf7eb0eead40b2150d802f6f (patch) | |
tree | cd991a8658981bc0ed7a9e17967a9bfee1bd97e2 /doc/classes/PackedInt64Array.xml | |
parent | 0e5b0c025ce3d4ad8082cbeb5394423854c2e25f (diff) |
Implement bsearch for Vector and Packed*Array
Diffstat (limited to 'doc/classes/PackedInt64Array.xml')
-rw-r--r-- | doc/classes/PackedInt64Array.xml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index da661b12c3..f7d232c634 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -44,6 +44,15 @@ Appends a [PackedInt64Array] at the end of this array. </description> </method> + <method name="bsearch"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <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="PackedInt64Array" /> <description> |