#unit #frequency #ghz #hz #mhz

no-std frequency-unit

A library for interacting with units of frequency

7 releases

new 0.2.4 Apr 27, 2025
0.2.3 Oct 7, 2024
0.2.2 Jul 14, 2024
0.1.2 Jun 23, 2024

#140 in Value formatting

Download history 3/week @ 2025-02-05 109/week @ 2025-04-23

109 downloads per month

MIT license

9KB
220 lines

Frequency Unit

A library for interaction with units of frequency.

Example

let freq = Frequency::from_mhz(1.0);
let freq2 = Frequency::from_mhz(2.0);
let freq3 = freq + freq2;

let a: f64 = freq3.to_mhz();

assert_eq!(a, 3.0);


let freq = Frequency::from_mhz(12.3456789);

assert_eq!(format!("{:<10.2}", freq), "12.35     MHz");

Dependencies

~460KB