Difference between revisions of "Acos"
From Xojo Documentation
(2 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
| name=Acos | | name=Acos | ||
| scope=global | | scope=global | ||
− | | owner= | + | | owner=global |
| returntype=[[Double]] | | returntype=[[Double]] | ||
− | | parameters=[[Double]] | + | | parameters=value As [[Double]] |
}} | }} | ||
{{Description | {{Description | ||
Line 40: | Line 40: | ||
</rbcode> | </rbcode> | ||
− | == See Also== | + | ==See Also== |
[[Cos]], [[Tan]], [[Atan]] functions | [[Cos]], [[Tan]], [[Atan]] functions | ||
[[Category:Language_Math]] | [[Category:Language_Math]] |
Latest revision as of 18:21, 28 January 2021
Global Method
Returns the arccosine of the value specified. The arccosine is the angle whose cosine is value. The returned angle is given in radians.
Usage
result = Acos(value)
Part | Type | Description |
---|---|---|
result | Double | The arc cosine of value. |
value | Double | The value you want the arc cosine of. |
Notes
The Acos function returns the angle (in radians) of the cosine passed to it. To convert the result from radians to degrees, multiply it by 180/Pi.
Sample Code
This example uses the Acos function to return the arc cosine of a number.
Var d As Double
Const Pi = 3.14159265
d = Acos(0.5) // returns 1.0471976
d = Acos(0.5) * 180 / Pi // returns 60
Const Pi = 3.14159265
d = Acos(0.5) // returns 1.0471976
d = Acos(0.5) * 180 / Pi // returns 60