diff options
Diffstat (limited to 'doc/classes/Array.xml')
-rw-r--r-- | doc/classes/Array.xml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index a30117725f..b8e0ac0c2a 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -272,6 +272,7 @@ array.Fill(0); // Initialize the 10 elements to 0. [/csharp] [/codeblocks] + [b]Note:[/b] If [param value] is of a reference type ([Object]-derived, [Array], [Dictionary], etc.) then the array is filled with the references to the same object, i.e. no duplicates are created. </description> </method> <method name="filter" qualifiers="const"> @@ -435,6 +436,16 @@ Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. </description> </method> + <method name="pick_random" qualifiers="const"> + <return type="Variant" /> + <description> + Returns a random value from the target array. + [codeblock] + var array: Array[int] = [1, 2, 3, 4] + print(array.pick_random()) # Prints either of the four numbers. + [/codeblock] + </description> + </method> <method name="pop_at"> <return type="Variant" /> <param index="0" name="position" type="int" /> |