feat(allows): add attributes that allow a non_snake_case variables
This commit is contained in:
parent
7157ffd55f
commit
ade98179f7
|
@ -1,15 +1,19 @@
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn reactive_resistance_of_capacitor(Cm: f64, L: f64, f: f64) -> f64 {
|
pub fn reactive_resistance_of_capacitor(Cm: f64, L: f64, f: f64) -> f64 {
|
||||||
1f64 / (2f64 * std::f64::consts::PI * f * Cm * L)
|
1f64 / (2f64 * std::f64::consts::PI * f * Cm * L)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn full_resistance_of_capacitor(Xc: f64, Rs: f64, Rm: f64, L: f64) -> f64 {
|
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.powf(2f64) + (Rs + Rm * L).powf(2f64)).sqrt()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn voltage_from_signal_source(Vs: f64, Xc: f64, Z: f64) -> f64 {
|
pub fn voltage_from_signal_source(Vs: f64, Xc: f64, Z: f64) -> f64 {
|
||||||
(Vs * Xc) / Z
|
(Vs * Xc) / Z
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn coef_of_signal_reduce(Vs: f64, V: f64) -> f64 {
|
pub fn coef_of_signal_reduce(Vs: f64, V: f64) -> f64 {
|
||||||
Vs / V
|
Vs / V
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue