Skip to main content

convert

Function convert 

Source
pub fn convert(value: f64, from: &Unit, to: &Unit) -> Result<f64, UnitsError>
Expand description

Convert value from one unit to another. Fails closed if the units have different dimensions (e.g. metres → seconds).