From 063637ec77bbb3f3b809d616005cb80d0cdc64b1 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 14 Oct 2022 18:53:07 +0200 Subject: Rename `float=64` SCons option to `precision=double` This avoids confusion with the old `bits=64` option and building for 64-bit CPUs in general. --- doc/classes/float.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/classes/float.xml') diff --git a/doc/classes/float.xml b/doc/classes/float.xml index a196021249..755ce1200d 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -5,7 +5,7 @@ The [float] built-in type is a 64-bit double-precision floating-point number, equivalent to [code]double[/code] in C++. This type has 14 reliable decimal digits of precision. The [float] type can be stored in [Variant], which is the generic type used by the engine. The maximum value of [float] is approximately [code]1.79769e308[/code], and the minimum is approximately [code]-1.79769e308[/code]. - Many methods and properties in the engine use 32-bit single-precision floating-point numbers instead, equivalent to [code]float[/code] in C++, which have 6 reliable decimal digits of precision. For data structures such as [Vector2] and [Vector3], Godot uses 32-bit floating-point numbers by default, but it can be changed to use 64-bit doubles if Godot is compiled with the [code]float=64[/code] option. + Many methods and properties in the engine use 32-bit single-precision floating-point numbers instead, equivalent to [code]float[/code] in C++, which have 6 reliable decimal digits of precision. For data structures such as [Vector2] and [Vector3], Godot uses 32-bit floating-point numbers by default, but it can be changed to use 64-bit doubles if Godot is compiled with the [code]precision=double[/code] option. Math done using the [float] type is not guaranteed to be exact or deterministic, and will often result in small errors. You should usually use the [method @GlobalScope.is_equal_approx] and [method @GlobalScope.is_zero_approx] methods instead of [code]==[/code] to compare [float] values for equality. -- cgit v1.2.3