ArcCos (FPScript)
Calculates the inverse cosine of the argument. The result is output in radians.
Syntax
ArcCos(Number)
The syntax of the ArcCos function consists of the following parts:
Part |
Description |
---|---|
Number |
The cosine of the angle you want to calculate. All data structures are allowed. All numeric data types are permitted. |
Remarks
The result has the same structure as the argument Number. The calculation is done element by element where appropriate.
The result has the unit rad, if Number has a unit. Otherwise, it has no unit.
For aggregate data structures, only the Y component is calculated.
The real inverse cosine function is calculated for a real argument. The result is of the 64-bit floating point value data type. The range for Number is then limited to the interval [-1, 1]. For each value of Number outside of this interval, the function returns a void value. The following illustration shows the course of the function in this interval:
If Number is complex, then the complex inverse cosine function is calculated, which can be defined as follows:
PI/2 + i * Log(i * Number + Sqrt(1 - Number2)) with the imaginary unit i = (0, 1).
The result is of the complex 64-bit floating point value data type. The following illustration shows the course of the absolute value of the function:
If the argument is a list, then the function is executed for each element of the list and the result is also a list.
Available in
FlexPro Basic, Professional, Developer Suite
Examples
ArcCos(0) |
Results in 1.570796. (= PI/2) |
ArcCos(-1.0) |
Results in 3.141592. (= PI) |
ArcCos(2) |
Results in ?, since the domain was exceeded. |
ArcCos((0, 1)) |
Results in (1.57079, -0.88137). (= PI/2 + (0, 1) * Log(Sqrt(2) - 1)) |
Dim x |
Calculates a signal with the course of the curve in the interval [-1, 1]. |