summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/doc_classes
diff options
context:
space:
mode:
authorNinni Pipping <over999ships@gmail.com>2023-04-03 11:38:09 +0200
committerNinni Pipping <over999ships@gmail.com>2023-05-30 15:38:10 +0200
commit5e3c625e24b32fbc91a3cb17f74a16d45f9a5a66 (patch)
treeab11445dc7674503cf8eb57b561d10c2c10835fe /modules/gdscript/doc_classes
parent3119255c0bb853a4f9acd575053425e211165bca (diff)
downloadredot-engine-5e3c625e24b32fbc91a3cb17f74a16d45f9a5a66.tar.gz
Add more info on the nature of NAN
Diffstat (limited to 'modules/gdscript/doc_classes')
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index a40afa702c..5a28246555 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -274,7 +274,7 @@
[b]Warning:[/b] Numeric infinity is only a concept with floating-point numbers, and has no equivalent for integers. Dividing an integer number by [code]0[/code] will not result in [constant INF] and will result in a run-time error instead.
</constant>
<constant name="NAN" value="nan">
- "Not a Number", an invalid floating-point value. [constant NAN] has special properties, including that it is not equal to itself ([code]NAN == NAN[/code] returns [code]false[/code]). It is output by some invalid operations, such as dividing floating-point [code]0.0[/code] by [code]0.0[/code].
+ "Not a Number", an invalid floating-point value. [constant NAN] has special properties, including that [code]!=[/code] always returns [code]true[/code], while other comparison operators always return [code]false[/code]. This is true even when comparing with itself ([code]NAN == NAN[/code] returns [code]false[/code] and [code]NAN != NAN[/code] returns [code]true[/code]). It is returned by some invalid operations, such as dividing floating-point [code]0.0[/code] by [code]0.0[/code].
[b]Warning:[/b] "Not a Number" is only a concept with floating-point numbers, and has no equivalent for integers. Dividing an integer [code]0[/code] by [code]0[/code] will not result in [constant NAN] and will result in a run-time error instead.
</constant>
</constants>