#frequency #unit #hz #ghz #mhz

no-std frequency-unit

A library for interacting with units of frequency

6 releases

0.2.3 Oct 7, 2024
0.2.2 Jul 14, 2024
0.1.2 Jun 23, 2024

#105 in Value formatting

Download history 153/week @ 2024-06-30 2/week @ 2024-07-07 189/week @ 2024-07-14 6/week @ 2024-07-21 5/week @ 2024-09-15 6/week @ 2024-09-22 147/week @ 2024-10-06 13/week @ 2024-10-13

166 downloads per month

MIT license

8KB
205 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

~465KB