From 9dbdec7e33a4e6251fa9942b2534e06f197985b3 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sat, 16 Jan 2021 21:45:08 +0100 Subject: [PATCH] Document workaround for storing 64-bit floats in PoolRealArray --- doc/classes/PoolRealArray.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/classes/PoolRealArray.xml b/doc/classes/PoolRealArray.xml index eb4db43f565..0d23d39c944 100644 --- a/doc/classes/PoolRealArray.xml +++ b/doc/classes/PoolRealArray.xml @@ -6,7 +6,7 @@ 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].