Make Vector<T>::duplicate() const

Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
This commit is contained in:
David Snopek
2025-11-01 14:00:38 -05:00
parent fc58be9bfc
commit bc9f3c7d92
13 changed files with 64 additions and 11 deletions

View File

@ -213,7 +213,7 @@
[b]Note:[/b] Decompression is not guaranteed to work with data not compressed by Godot, for example if data compressed with the deflate compression mode lacks a checksum or header.
</description>
</method>
<method name="duplicate">
<method name="duplicate" qualifiers="const">
<return type="PackedByteArray" />
<description>
Creates a copy of the array, and returns it.

View File

@ -73,7 +73,7 @@
Returns the number of times an element is in the array.
</description>
</method>
<method name="duplicate">
<method name="duplicate" qualifiers="const">
<return type="PackedColorArray" />
<description>
Creates a copy of the array, and returns it.

View File

@ -71,7 +71,7 @@
[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.
</description>
</method>
<method name="duplicate">
<method name="duplicate" qualifiers="const">
<return type="PackedFloat32Array" />
<description>
Creates a copy of the array, and returns it.

View File

@ -72,7 +72,7 @@
[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.
</description>
</method>
<method name="duplicate">
<method name="duplicate" qualifiers="const">
<return type="PackedFloat64Array" />
<description>
Creates a copy of the array, and returns it.

View File

@ -69,7 +69,7 @@
Returns the number of times an element is in the array.
</description>
</method>
<method name="duplicate">
<method name="duplicate" qualifiers="const">
<return type="PackedInt32Array" />
<description>
Creates a copy of the array, and returns it.

View File

@ -70,7 +70,7 @@
Returns the number of times an element is in the array.
</description>
</method>
<method name="duplicate">
<method name="duplicate" qualifiers="const">
<return type="PackedInt64Array" />
<description>
Creates a copy of the array, and returns it.

View File

@ -76,7 +76,7 @@
Returns the number of times an element is in the array.
</description>
</method>
<method name="duplicate">
<method name="duplicate" qualifiers="const">
<return type="PackedStringArray" />
<description>
Creates a copy of the array, and returns it.

View File

@ -76,7 +76,7 @@
[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.
</description>
</method>
<method name="duplicate">
<method name="duplicate" qualifiers="const">
<return type="PackedVector2Array" />
<description>
Creates a copy of the array, and returns it.

View File

@ -75,7 +75,7 @@
[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.
</description>
</method>
<method name="duplicate">
<method name="duplicate" qualifiers="const">
<return type="PackedVector3Array" />
<description>
Creates a copy of the array, and returns it.

View File

@ -75,7 +75,7 @@
[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.
</description>
</method>
<method name="duplicate">
<method name="duplicate" qualifiers="const">
<return type="PackedVector4Array" />
<description>
Creates a copy of the array, and returns it.