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

(cherry picked from commit d359e159da)
This commit is contained in:
Hugo Locurcio 2021-03-15 17:25:22 +01:00 committed by Rémi Verschelde
parent d82c01c1a0
commit ee8661158c
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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)