Rust

Rust

Made by DeepSource

Found manual approximation of known floating constant RS-W1207

Bug risk
Major

Several mathematical values such as π (pi) or τ (tau) have highly accurate constants defined in the standard library. Consider using these values directly to reduce manual error.

Bad practice

let pi = 3.141;

Recommended

let pi = std::f64::consts::PI;