summaryrefslogtreecommitdiffstats
path: root/doc/classes/float.xml
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-10-02 20:11:43 +0200
committerYuri Sizov <yuris@humnom.net>2023-10-03 15:48:31 +0200
commitcc0eebd9d8a42f3e57d4633c4388faa6d369d2c8 (patch)
treee539714cf844f473b5417ee388f9eeab113a863c /doc/classes/float.xml
parenta2f90d565ad29edcb3bdab77bc7df51cdde8514a (diff)
downloadredot-engine-cc0eebd9d8a42f3e57d4633c4388faa6d369d2c8.tar.gz
Validate `code` tags for class and member references
This commit also adds means to manually disable warnings in `code` tags where it's a false positive with the new `skip-lint` attribute. Warnings are now enabled on CI to prevent future errors.
Diffstat (limited to 'doc/classes/float.xml')
-rw-r--r--doc/classes/float.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index 7d74e3d832..3ffaa60c32 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 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]precision=double[/code] option.
+ Many methods and properties in the engine use 32-bit single-precision floating-point numbers instead, equivalent to [code skip-lint]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 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>