[−][src]Crate mag
Mag is a library for dealing with units of measure. Magnitude!
Highlights
- Easy to understand and use
- No external dependencies
- Fast compile time
- Units are not discarded when creating quantities
Example
use mag::length::{ft, m}; let a = 1.0 * ft; // Length<ft> let b = a.to::<m>(); // Length<m> assert_eq!(b.to_string(), "0.3048 m");
Room For Improvement
- Small set of quantities and units implemented
- Quantities are f64 only
Modules
length | Base units of length. |
time | Base units of time. |
Structs
Area | A measurement of physical area. |
Frequency | A measurement of temporal frequency for repeating events. |
Length | A measurement of physical length, distance or range. |
Period | A measurement of period, duration or interval of time. |
Volume | A measurement of physical volume. |