[Mag] is a library for dealing with physical quantities and units.

Quantities are created by multiplying scalar values by a unit type. These units are named after common abbreviations:

```rust use mag::{length::{ft, m, mi}, time::{h, s}};

let a = 1.0 * ft; asserteq!(a.tostring(), "1 ft");

let b = a.to::(); asserteq!(b.tostring(), "0.3048 m");

let c = 30 * s; asserteq!(c.tostring(), "30 s");

let d = 60.0 / s; asserteq!(d.tostring(), "60 ㎐");

let e = 55.0 * mi / h; asserteq!(e.tostring(), "55 mi/h"); ```

Highlights

Alternative

If mag doesn't fit your needs, you could try the [uom] crate, which has many more features.