mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
classref: Sync with current master branch (96cdbbe)
This commit is contained in:
@@ -21,7 +21,7 @@ An array specifically designed to hold 32-bit integer values. Packs data tightly
|
||||
|
||||
\ **Note:** This type stores signed 32-bit integers, which means it can take values in the interval ``[-2^31, 2^31 - 1]``, i.e. ``[-2147483648, 2147483647]``. Exceeding those bounds will wrap around. In comparison, :ref:`int<class_int>` uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see :ref:`PackedInt64Array<class_PackedInt64Array>`.
|
||||
|
||||
\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate<class_PackedInt32Array_method_duplicate>`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
|
||||
\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate()<class_PackedInt32Array_method_duplicate>`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -167,7 +167,7 @@ Method Descriptions
|
||||
|
||||
:ref:`bool<class_bool>` **append**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt32Array_method_append>`
|
||||
|
||||
Appends an element at the end of the array (alias of :ref:`push_back<class_PackedInt32Array_method_push_back>`).
|
||||
Appends an element at the end of the array (alias of :ref:`push_back()<class_PackedInt32Array_method_push_back>`).
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -193,7 +193,7 @@ 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 ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array.
|
||||
|
||||
\ **Note:** Calling :ref:`bsearch<class_PackedInt32Array_method_bsearch>` on an unsorted array results in unexpected behavior.
|
||||
\ **Note:** Calling :ref:`bsearch()<class_PackedInt32Array_method_bsearch>` on an unsorted array results in unexpected behavior.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -205,7 +205,7 @@ Finds the index of an existing value (or the insertion index that maintains sort
|
||||
|
||||
|void| **clear**\ (\ ) :ref:`🔗<class_PackedInt32Array_method_clear>`
|
||||
|
||||
Clears the array. This is equivalent to using :ref:`resize<class_PackedInt32Array_method_resize>` with a size of ``0``.
|
||||
Clears the array. This is equivalent to using :ref:`resize()<class_PackedInt32Array_method_resize>` with a size of ``0``.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -241,7 +241,7 @@ Creates a copy of the array, and returns it.
|
||||
|
||||
|void| **fill**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt32Array_method_fill>`
|
||||
|
||||
Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize<class_PackedInt32Array_method_resize>` to create an array with a given size and initialized elements.
|
||||
Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize()<class_PackedInt32Array_method_resize>` to create an array with a given size and initialized elements.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -337,7 +337,7 @@ Removes an element from the array by index.
|
||||
|
||||
:ref:`int<class_int>` **resize**\ (\ new_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt32Array_method_resize>`
|
||||
|
||||
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize<class_PackedInt32Array_method_resize>` once and assigning the new values is faster than adding new elements one by one.
|
||||
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize()<class_PackedInt32Array_method_resize>` once and assigning the new values is faster than adding new elements one by one.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -456,7 +456,7 @@ Returns ``true`` if contents of the arrays differ.
|
||||
|
||||
:ref:`PackedInt32Array<class_PackedInt32Array>` **operator +**\ (\ right\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_PackedInt32Array_operator_sum_PackedInt32Array>`
|
||||
|
||||
Returns a new **PackedInt32Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array<class_PackedInt32Array_method_append_array>` instead.
|
||||
Returns a new **PackedInt32Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array()<class_PackedInt32Array_method_append_array>` instead.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
||||
Reference in New Issue
Block a user