mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Add more info on the nature of NAN
(cherry picked from commit 5e3c625e24)
This commit is contained in:
committed by
Yuri Sizov
parent
a44409bf54
commit
0e697e102b
@@ -412,6 +412,7 @@
|
||||
<description>
|
||||
Returns [code]true[/code] if the vectors are not equal.
|
||||
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
|
||||
[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator *">
|
||||
@@ -494,6 +495,7 @@
|
||||
<param index="0" name="right" type="Vector2" />
|
||||
<description>
|
||||
Compares two [Vector2] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
|
||||
[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator <=">
|
||||
@@ -501,6 +503,7 @@
|
||||
<param index="0" name="right" type="Vector2" />
|
||||
<description>
|
||||
Compares two [Vector2] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
|
||||
[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator ==">
|
||||
@@ -509,6 +512,7 @@
|
||||
<description>
|
||||
Returns [code]true[/code] if the vectors are exactly equal.
|
||||
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
|
||||
[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator >">
|
||||
@@ -516,6 +520,7 @@
|
||||
<param index="0" name="right" type="Vector2" />
|
||||
<description>
|
||||
Compares two [Vector2] vectors by first checking if the X value of the left vector is greater than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
|
||||
[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator >=">
|
||||
@@ -523,6 +528,7 @@
|
||||
<param index="0" name="right" type="Vector2" />
|
||||
<description>
|
||||
Compares two [Vector2] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
|
||||
[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator []">
|
||||
|
||||
Reference in New Issue
Block a user