summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authormashumafi <mashumafi@gmail.com>2021-09-19 18:13:09 +0000
committermashumafi <mashumafi@gmail.com>2021-09-30 23:57:26 +0000
commit214bbfbefed2ae97bf7eb0eead40b2150d802f6f (patch)
treecd991a8658981bc0ed7a9e17967a9bfee1bd97e2 /doc
parent0e5b0c025ce3d4ad8082cbeb5394423854c2e25f (diff)
Implement bsearch for Vector and Packed*Array
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/PackedByteArray.xml9
-rw-r--r--doc/classes/PackedColorArray.xml9
-rw-r--r--doc/classes/PackedFloat32Array.xml9
-rw-r--r--doc/classes/PackedFloat64Array.xml9
-rw-r--r--doc/classes/PackedInt32Array.xml9
-rw-r--r--doc/classes/PackedInt64Array.xml9
-rw-r--r--doc/classes/PackedStringArray.xml9
-rw-r--r--doc/classes/PackedVector2Array.xml9
-rw-r--r--doc/classes/PackedVector3Array.xml9
9 files changed, 81 insertions, 0 deletions
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index 9b8057d91a..e0c6fb4eba 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -43,6 +43,15 @@
Appends a [PackedByteArray] 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="compress" qualifiers="const">
<return type="PackedByteArray" />
<argument index="0" name="compression_mode" type="int" default="0" />
diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml
index fb744d7534..16d64826b8 100644
--- a/doc/classes/PackedColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -43,6 +43,15 @@
Appends a [PackedColorArray] at the end of this array.
</description>
</method>
+ <method name="bsearch">
+ <return type="int" />
+ <argument index="0" name="value" type="Color" />
+ <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="PackedColorArray" />
<description>
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index 0c05e8f3c2..b2a96e90c3 100644
--- a/doc/classes/PackedFloat32Array.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -44,6 +44,15 @@
Appends a [PackedFloat32Array] at the end of this array.
</description>
</method>
+ <method name="bsearch">
+ <return type="int" />
+ <argument index="0" name="value" type="float" />
+ <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="PackedFloat32Array" />
<description>
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
index e55bc0e657..bf8c8dd333 100644
--- a/doc/classes/PackedFloat64Array.xml
+++ b/doc/classes/PackedFloat64Array.xml
@@ -44,6 +44,15 @@
Appends a [PackedFloat64Array] at the end of this array.
</description>
</method>
+ <method name="bsearch">
+ <return type="int" />
+ <argument index="0" name="value" type="float" />
+ <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="PackedFloat64Array" />
<description>
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
index 887a7a1e51..1d724f0e67 100644
--- a/doc/classes/PackedInt32Array.xml
+++ b/doc/classes/PackedInt32Array.xml
@@ -44,6 +44,15 @@
Appends a [PackedInt32Array] 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="PackedInt32Array" />
<description>
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>
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index 8f16abaf37..7e807f6fea 100644
--- a/doc/classes/PackedStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -44,6 +44,15 @@
Appends a [PackedStringArray] at the end of this array.
</description>
</method>
+ <method name="bsearch">
+ <return type="int" />
+ <argument index="0" name="value" type="String" />
+ <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="PackedStringArray" />
<description>
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index 3678222da4..f9d2bc6d69 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -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>
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index 84d4297a3b..fc609665e9 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -43,6 +43,15 @@
Appends a [PackedVector3Array] at the end of this array.
</description>
</method>
+ <method name="bsearch">
+ <return type="int" />
+ <argument index="0" name="value" type="Vector3" />
+ <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="PackedVector3Array" />
<description>