measurement 0.3.0

unit safe computation in rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::{Quantity, Dimension};

pub type Length                  = Quantity<Dimension<1, 0, 0, 0, 0, 0, 0>>;
pub type Mass                    = Quantity<Dimension<0, 1, 0, 0, 0, 0, 0>>;
pub type Time                    = Quantity<Dimension<0, 0, 1, 0, 0, 0, 0>>;
pub type ElectricalCurrent       = Quantity<Dimension<0, 0, 0, 1, 0, 0, 0>>;
pub type ThermodynamicTemperatur = Quantity<Dimension<0, 0, 0, 0, 1, 0, 0>>;
pub type AmountOfSubstance       = Quantity<Dimension<0, 0, 0, 0, 0, 1, 0>>;
pub type LuminousIntensity       = Quantity<Dimension<0, 0, 0, 0, 0, 0, 1>>;

pub type Velocity     = Quantity<Dimension<1, 0, -1, 0, 0, 0, 0>>;
pub type Acceleration = Quantity<Dimension<1, 0, -2, 0, 0, 0, 0>>;
pub type Force        = Quantity<Dimension<1, 1, -2, 0, 0, 0, 0>>;