Przeglądaj źródła

Document the valid input range for `acos()` and `atan()`

(cherry picked from commit d359e159da9170417a65bbd4a5b7b4e64a01bded)
Hugo Locurcio 4 lat temu
rodzic
commit
ee8661158c
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      modules/gdscript/doc_classes/@GDScript.xml

+ 2 - 2
modules/gdscript/doc_classes/@GDScript.xml

@@ -64,7 +64,7 @@
 			<argument index="0" name="s" type="float">
 			</argument>
 			<description>
-				Returns the arc cosine of [code]s[/code] in radians. Use to get the angle of cosine [code]s[/code].
+				Returns the arc cosine of [code]s[/code] in radians. Use to get the angle of cosine [code]s[/code]. [code]s[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method acos] will return [constant NAN].
 				[codeblock]
 				# c is 0.523599 or 30 degrees if converted with rad2deg(s)
 				c = acos(0.866025)
@@ -77,7 +77,7 @@
 			<argument index="0" name="s" type="float">
 			</argument>
 			<description>
-				Returns the arc sine of [code]s[/code] in radians. Use to get the angle of sine [code]s[/code].
+				Returns the arc sine of [code]s[/code] in radians. Use to get the angle of sine [code]s[/code]. [code]s[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method asin] will return [constant NAN].
 				[codeblock]
 				# s is 0.523599 or 30 degrees if converted with rad2deg(s)
 				s = asin(0.5)