Skip to main content

reactance

Function reactance 

Source
pub fn reactance(
    freq_hz: f64,
    capacitance_f: Option<f64>,
    inductance_h: Option<f64>,
) -> Result<ReactanceResult, CalcError>
Expand description

Calculate capacitive reactance, inductive reactance, and resonant frequency.

§Arguments

  • freq_hz — frequency in Hz (must be > 0)
  • capacitance_f — capacitance in Farads (None to skip Xc and f_res)
  • inductance_h — inductance in Henries (None to skip Xl and f_res)

§Errors

Returns CalcError::OutOfRange if freq_hz ≤ 0 or either value is ≤ 0.