Skip to main content

hz_to_ppm

Function hz_to_ppm 

Source
pub fn hz_to_ppm(
    center_hz: f64,
    max_hz: f64,
) -> Result<HzToPpmResult, CalcError>
Expand description

Convert frequency deviation to PPM.

§Arguments

  • center_hz — nominal (center) frequency in Hz (must be > 0)
  • max_hz — upper frequency limit in Hz (must be > center_hz)

§Errors

Returns CalcError::OutOfRange if inputs are invalid.