1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-03 19:11:41 +00:00

Document workaround for storing 64-bit floats in PoolRealArray

This commit is contained in:
Hugo Locurcio
2021-01-16 21:45:08 +01:00
parent 99fdf25613
commit 9dbdec7e33

View File

@@ -6,7 +6,7 @@
<description>
An [Array] specifically designed to hold floating-point values. Optimized for memory usage, does not fragment the memory.
[b]Note:[/b] This type is passed by value and not by reference.
[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in [PoolRealArray] are 32-bit floats. This means values stored in [PoolRealArray] have lower precision compared to primitive [float]s.
[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in [PoolRealArray] are 32-bit floats. This means values stored in [PoolRealArray] have lower precision compared to primitive [float]s. If you need to store 64-bit floats in an array, use a generic [Array] with [float] elements as these will still be 64-bit. However, using a generic [Array] to store [float]s will use roughly 6 times more memory compared to a [PoolRealArray].
</description>
<tutorials>
</tutorials>