mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Document the valid input range for acos() and atan()
(cherry picked from commit d359e159da)
This commit is contained in:
committed by
Rémi Verschelde
parent
d82c01c1a0
commit
ee8661158c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user