pi
mathReturns the value of π (pi)
Syntax
pi() Returns
number The mathematical constant π (approximately 3.14159265...)
Examples
Input:
pi() Output:
3.14159265... Input:
pi() * 2 Output:
6.283... (2π) Input:
pi() / 2 | sin Output:
1 The pi() function returns the mathematical constant π (pi), approximately 3.14159265358979323846.
Usage
Use pi() in trigonometric calculations, circle geometry, or any mathematical operation requiring the value of π.