math.acos() - Pine Script Function
math.acos()
Section titled “math.acos()”Overview
Section titled “Overview”The acos function returns the arccosine (in radians) of number such that cos(acos(y)) = y for y in range [-1, 1].
Syntax
Section titled “Syntax”math.acos(angle) → const floatParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| angle | const int/float | The value |
| in | — | radians |
| to | — | use in the calculation. |
Returns
Section titled “Returns”The arc cosine of a value; the returned angle is in the range [0, Pi], or na if y is outside of range [-1, 1].