fix(power): change math power method

The exponentiation method has been changed because, in this case, the
calculation doesn't need to be raised to a power number using the
.powf() method.
This commit is contained in:
doryan 2024-08-09 17:51:07 +04:00
parent 45617aa59d
commit 2e7ede2dac

View File

@ -9,7 +9,7 @@ pub fn reactive_resistance_of_capacitor(Cm: f64, L: f64, f: f64) -> f64 {
#[allow(non_snake_case)]
pub fn full_resistance_of_capacitor(Xc: f64, Rs: f64, Rm: f64, L: f64) -> f64 {
(Xc.powf(2f64) + (Rs + Rm * L).powf(2f64)).sqrt()
(Xc.powi(2) + (Rs + Rm * L).powi(2)).sqrt()
}
#[allow(non_snake_case)]