Docs

math.pi

Use the constant pi in a formula.

itm
math.pi()

The constant pi, 3.141592653589793. Written as a call, math.pi(), because every builtin is an operator and the language has no builtin variables.

Parameters

None.

Output

NameType
valuenumber

Warm-up and missing values

Warm-up
None.
Missing values
Total: a constant, never na.

Example

itm
math.pi()
itm
plot(math.cos(math.pi() * ta.rsi(close, 14) / 100), "Phase")