Using a single value from the Standard library
use std::f32::consts::PI; // use std::f64::consts::PI; // error[E0252]: the name `PI` is defined multiple times fn main() { println!("{}", PI); }
3.1415927
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
use std::f32::consts::PI; // use std::f64::consts::PI; // error[E0252]: the name `PI` is defined multiple times fn main() { println!("{}", PI); }
3.1415927