fix(const): use PI const from std instead 3.14f32

This commit is contained in:
doryan 2024-07-19 23:39:44 +04:00
parent 74835302ce
commit 81a8d9b2c6

View File

@ -1,5 +1,5 @@
pub fn reactive_resistance_of_capacitor(Cm: f64, L: f64, f: f64) -> f64 {
1f64 / (2f64 * 3.14f64 * f * Cm * L)
1f64 / (2f64 * std::f64::consts::PI * f * Cm * L)
}
pub fn full_resistance_of_capacitor(Xc: f64, Rs: f64, Rm: f64, L: f64) -> f64 {