- std
- f32
- f64
- consts
- PI
Using the Standard library
examples/libraries/std-pi/src/main.rs
fn main() { println!("{}", std::f32::consts::PI); println!("{}", std::f64::consts::PI); // println!("{}", PI); // error[E0425]: cannot find value `PI` in this scope }
3.1415927 3.141592653589793