classref: Sync with current master branch (215acd5)

This commit is contained in:
Godot Organization
2025-04-12 03:23:36 +00:00
parent 8c18714228
commit fd1c63103f
157 changed files with 10283 additions and 2474 deletions

View File

@@ -21,7 +21,7 @@ An array specifically designed to hold 32-bit floating-point values (float). Pac
If you need to pack 64-bit floats tightly, see :ref:`PackedFloat64Array<class_PackedFloat64Array>`.
\ **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_PackedFloat32Array_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_PackedFloat32Array_method_duplicate>`. This is *not* the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will *not* affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.
.. note::
@@ -64,6 +64,8 @@ Methods
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`duplicate<class_PackedFloat32Array_method_duplicate>`\ (\ ) |
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`erase<class_PackedFloat32Array_method_erase>`\ (\ value\: :ref:`float<class_float>`\ ) |
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`fill<class_PackedFloat32Array_method_fill>`\ (\ value\: :ref:`float<class_float>`\ ) |
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`find<class_PackedFloat32Array_method_find>`\ (\ value\: :ref:`float<class_float>`, from\: :ref:`int<class_int>` = 0\ ) |const| |
@@ -239,6 +241,20 @@ Creates a copy of the array, and returns it.
----
.. _class_PackedFloat32Array_method_erase:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **erase**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedFloat32Array_method_erase>`
Removes the first occurrence of a value from the array and returns ``true``. If the value does not exist in the array, nothing happens and ``false`` is returned. To remove an element by index, use :ref:`remove_at()<class_PackedFloat32Array_method_remove_at>` instead.
\ **Note:** :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>` doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.
.. rst-class:: classref-item-separator
----
.. _class_PackedFloat32Array_method_fill:
.. rst-class:: classref-method
@@ -347,6 +363,8 @@ Removes an element from the array by index.
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_PackedFloat32Array_method_resize>` once and assigning the new values is faster than adding new elements one by one.
Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, or one of the following :ref:`Error<enum_@GlobalScope_Error>` constants if this method fails: :ref:`@GlobalScope.ERR_INVALID_PARAMETER<class_@GlobalScope_constant_ERR_INVALID_PARAMETER>` if the size is negative, or :ref:`@GlobalScope.ERR_OUT_OF_MEMORY<class_@GlobalScope_constant_ERR_OUT_OF_MEMORY>` if allocations fail. Use :ref:`size()<class_PackedFloat32Array_method_size>` to find the actual size of the array after resize.
.. rst-class:: classref-item-separator
----