summaryrefslogtreecommitdiffstats
path: root/doc/classes/PackedByteArray.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/PackedByteArray.xml')
-rw-r--r--doc/classes/PackedByteArray.xml36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index 0652cf0aa1..82bfa14ded 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -515,6 +515,42 @@
Returns the slice of the [PackedByteArray] between indices (inclusive) as a new [PackedByteArray]. Any negative index is considered to be from the end of the array.
</description>
</method>
+ <method name="to_float32_array" qualifiers="const">
+ <return type="PackedFloat32Array">
+ </return>
+ <description>
+ Returns a copy of the data converted to a [PackedFloat32Array], where each block of 4 bytes has been converted to a 32-bit float (C++ [code]float[/code]).
+ The size of the new array will be [code]byte_array.size() / 4[/code].
+ If the original data can't be converted to 32-bit floats, the resulting data is undefined.
+ </description>
+ </method>
+ <method name="to_float64_array" qualifiers="const">
+ <return type="PackedFloat64Array">
+ </return>
+ <description>
+ Returns a copy of the data converted to a [PackedFloat64Array], where each block of 8 bytes has been converted to a 64-bit float (C++ [code]double[/code], Godot [float]).
+ The size of the new array will be [code]byte_array.size() / 8[/code].
+ If the original data can't be converted to 64-bit floats, the resulting data is undefined.
+ </description>
+ </method>
+ <method name="to_int32_array" qualifiers="const">
+ <return type="PackedInt32Array">
+ </return>
+ <description>
+ Returns a copy of the data converted to a [PackedInt32Array], where each block of 4 bytes has been converted to a signed 32-bit integer (C++ [code]int32_t[/code]).
+ The size of the new array will be [code]byte_array.size() / 4[/code].
+ If the original data can't be converted to signed 32-bit integers, the resulting data is undefined.
+ </description>
+ </method>
+ <method name="to_int64_array" qualifiers="const">
+ <return type="PackedInt64Array">
+ </return>
+ <description>
+ Returns a copy of the data converted to a [PackedInt64Array], where each block of 4 bytes has been converted to a signed 64-bit integer (C++ [code]int64_t[/code], Godot [int]).
+ The size of the new array will be [code]byte_array.size() / 8[/code].
+ If the original data can't be converted to signed 64-bit integers, the resulting data is undefined.
+ </description>
+ </method>
</methods>
<constants>
</constants>