diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-18 13:22:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 13:22:35 +0100 |
commit | 9912492e937d2454a21ec7465538aab2431ac249 (patch) | |
tree | 4afd7886de16fabdd4da07f3922f68c55b0cb6a8 /doc/classes/PackedInt32Array.xml | |
parent | 366d3930ac96db5561afd23b1063085fccf6dcd6 (diff) | |
parent | c6cefb1b79d207af1bc78ce20c01b5788e806252 (diff) |
Merge pull request #56668 from akien-mga/array-slice-nicer-bound-checks
Diffstat (limited to 'doc/classes/PackedInt32Array.xml')
-rw-r--r-- | doc/classes/PackedInt32Array.xml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index da26e93b96..ec698ed8e5 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -133,8 +133,11 @@ <method name="slice" qualifiers="const"> <return type="PackedInt32Array" /> <argument index="0" name="begin" type="int" /> - <argument index="1" name="end" type="int" /> + <argument index="1" name="end" type="int" default="2147483647" /> <description> + Returns the slice of the [PackedInt32Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedInt32Array]. + The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]). + If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]). </description> </method> <method name="sort"> |