From 214bbfbefed2ae97bf7eb0eead40b2150d802f6f Mon Sep 17 00:00:00 2001 From: mashumafi Date: Sun, 19 Sep 2021 18:13:09 +0000 Subject: Implement bsearch for Vector and Packed*Array --- doc/classes/PackedByteArray.xml | 9 +++++++++ doc/classes/PackedColorArray.xml | 9 +++++++++ doc/classes/PackedFloat32Array.xml | 9 +++++++++ doc/classes/PackedFloat64Array.xml | 9 +++++++++ doc/classes/PackedInt32Array.xml | 9 +++++++++ doc/classes/PackedInt64Array.xml | 9 +++++++++ doc/classes/PackedStringArray.xml | 9 +++++++++ doc/classes/PackedVector2Array.xml | 9 +++++++++ doc/classes/PackedVector3Array.xml | 9 +++++++++ 9 files changed, 81 insertions(+) (limited to 'doc/classes') 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. + + + + + + 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. + + 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. + + + + + + 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. + + 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. + + + + + + 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. + + 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. + + + + + + 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. + + 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. + + + + + + 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. + + 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. + + + + + + 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. + + 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. + + + + + + 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. + + 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. + + + + + + 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. + + 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. + + + + + + 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. + + -- cgit v1.2.3