Expand description
Description
Yet one more another unit/dimension support library for rust.
This package lets you write units of physical quantities in the same way you always write it.
Usage
use ::unitage:: { *, predefined::* };
fn bmi(hight: Length<f64>, weight: Mass<f64>) -> f64 {
let bmi = weight / hight / hight;
unit!("kg/m2").value(bmi)
}
let h = pq!(5f64, "ft.") + pq!(8f64, "in.");
let w = pq!(200f64, "lb");
assert_eq!(bmi(h, w), 30.409583894427303); // Lose weight!!
Package Structure
This package is a entry points for each implementation packages.
For details following topics, please refer the documentation of each sub-package.
Re-exports
Modules
Macros
Generate PhysicalQuantity from value and unit string.
Structs
linear convertion coefficients target_unit = a * source_unit_value + b
Static (compile time) Dimension.
Dynamic (runtime) Dimension
Representation of fractional value.
Represents physical quantity
Representation of Unit