Math.Acos(Value)
.Acos() method returns the arccosine (in radians) of a number.
Applies To
Description
Properties and Methods
None
Available
The .Acos(Value) method is available in:
- 15.03.016
- All newer builds
Type
Decimal
Syntax
Math.Acos(Value);
Parameters
Parameter |
Required |
Description |
---|---|---|
Value |
Yes |
A number representing a cosine where the value is between -1 and 1. Any values outside -1 and 1 will result in a scripting error. |
Example
//--Returns the arccosine, an angle in radians
var lcMath = 'Math.Acos(-1): ' + Convert.ToString(Math.Acos(-1)) + '\n';
lcMath += 'Math.Acos(-.5): ' + Convert.ToString(Math.Acos(-.5)) + '\n';
lcMath += 'Math.Acos(0): ' + Convert.ToString(Math.Acos(0)) + '\n';
lcMath += 'Math.Acos(.5): ' + Convert.ToString(Math.Acos(.5)) + '\n';
lcMath += 'Math.Acos(1): ' + Convert.ToString(Math.Acos(1));
Event.Form.MessageBox(lcMath);
/* Expected System Prompt Display:
Math.Acos(-1): 3.14159265358979
Math.Acos(-.5): 2.0943951023932
Math.Acos(0): 1.5707963267949
Math.Acos(.5): 1.0471975511966
Math.Acos(1): 0
*/