diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-05-10 13:39:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-10 13:39:55 +0200 |
commit | cc66d5e173ef5e585321853178449b19be739561 (patch) | |
tree | 0a76cb87b9b52ea3688c92489e6e05f46f8807e1 /doc/classes/PackedVector3Array.xml | |
parent | b9b78fdaee9a55bb7d1741752ab1a84a325addba (diff) | |
parent | 380a53f02f3f5fd4037e6b743a0ca8fadfe754ca (diff) |
Merge pull request #60855 from timothyqiu/packed-array-find
Add search methods for packed arrays
Diffstat (limited to 'doc/classes/PackedVector3Array.xml')
-rw-r--r-- | doc/classes/PackedVector3Array.xml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index 6d460cecab..1207293c32 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -54,6 +54,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector3" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedVector3Array" /> <description> @@ -67,6 +74,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector3" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="Vector3" /> @@ -115,6 +130,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector3" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> |