aboutsummaryrefslogtreecommitdiff
path: root/doc/classes/Array.xml
diff options
context:
space:
mode:
authorRémi Verschelde2017-11-24 09:16:27 +0100
committerRémi Verschelde2017-11-24 09:16:27 +0100
commit15ada56d73817c5c0be97882a88cb27696fcd3a8 (patch)
tree941e0461c4336da1826869caf0d6f363225a267d /doc/classes/Array.xml
parent679b64fe48a33781800fe70ea1ba2d25e201826c (diff)
downloadgodot-15ada56d73817c5c0be97882a88cb27696fcd3a8.tar.gz
godot-15ada56d73817c5c0be97882a88cb27696fcd3a8.tar.zst
godot-15ada56d73817c5c0be97882a88cb27696fcd3a8.zip
doc: Sync classref with current source
Diffstat (limited to 'doc/classes/Array.xml')
-rw-r--r--doc/classes/Array.xml52
1 files changed, 26 insertions, 26 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 3bb40755a..aa477b2e0 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -88,6 +88,32 @@
Returns the last element of the array if the array is not empty (size>0).
</description>
</method>
+ <method name="bsearch">
+ <return type="int">
+ </return>
+ <argument index="0" name="value" type="var">
+ </argument>
+ <argument index="1" name="before" type="bool" default="True">
+ </argument>
+ <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 before specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. Note that calling bsearch on an unsorted array results in unexpected behavior.
+ </description>
+ </method>
+ <method name="bsearch_custom">
+ <return type="int">
+ </return>
+ <argument index="0" name="value" type="var">
+ </argument>
+ <argument index="1" name="obj" type="Object">
+ </argument>
+ <argument index="2" name="func" type="String">
+ </argument>
+ <argument index="3" name="before" type="bool" default="True">
+ </argument>
+ <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 and a custom comparison method. Optionally, a before specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return true if the first argument is less than the second, and return false otherwise. Note that calling bsearch on an unsorted array results in unexpected behavior.
+ </description>
+ </method>
<method name="clear">
<description>
Clear the array (resize to 0).
@@ -260,32 +286,6 @@
Sort the array using a custom method and return reference to the array. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
</description>
</method>
- <method name="bsearch">
- <return type="int">
- </return>
- <argument index="0" name="value" type="var">
- </argument>
- <argument index="1" name="before" type="bool" default="true">
- </argument>
- <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 before specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. Note that calling bsearch on an unsorted array results in unexpected behavior.
- </description>
- </method>
- <method name="bsearch_custom">
- <return type="int">
- </return>
- <argument index="0" name="value" type="var">
- </argument>
- <argument index="1" name="obj" type="Object">
- </argument>
- <argument index="2" name="func" type="String">
- </argument>
- <argument index="3" name="before" type="bool" default="true">
- </argument>
- <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 and a custom comparison method. Optionally, a before specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return true if the first argument is less than the second, and return false otherwise. Note that calling bsearch on an unsorted array results in unexpected behavior.
- </description>
- </method>
</methods>
<constants>
</constants>