The mathematical constant pi, available as a Number.
Signature
pi: Numberpi is a finite binary64 approximation. Angles passed to sin and cos are radians; one full turn is 2 * pi. The name is available in ordinary expressions.
Examples
Measure a circle
The circumference scales linearly with the radius.
main.kj
Loading…Drag to orbit · select to inspect
0 entities
Scene controls
Results
Loading the language runtime…
Output 0
No output.
State
Compile source to inspect its values.
TraceNo execution yet
- Executed source spans appear here.
Expected output
12.566370614359172
Rust definition
The Rust interpreter installs std::f64::consts::PI as a Number binding.
View Rust documentation →Support: runtime