diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-12-10 22:08:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-10 22:08:18 +0100 |
commit | 21136aaf9ae679f76f52b7ffa9703480ba555403 (patch) | |
tree | a1b5417010460ac6bc0ed32b5c1d4dba298ee544 /doc/classes/float.xml | |
parent | c3d7f7a57ebbb8ce47f44997d6936bffd81e9160 (diff) | |
parent | 063637ec77bbb3f3b809d616005cb80d0cdc64b1 (diff) |
Merge pull request #67399 from Calinou/rename-precision-double-scons
Rename `float=64` SCons option to `precision=double`
Diffstat (limited to 'doc/classes/float.xml')
-rw-r--r-- | doc/classes/float.xml | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ </brief_description> <description> 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. </description> <tutorials> |