Skip to main content

convert_value

Function convert_value 

Source
pub fn convert_value(
    value: f64,
    from: &ConversionUnit,
    to: &ConversionUnit,
) -> Result<f64, UnitConversionError>
Expand description

Convert value from one unit to another.

ยงErrors

As unit_conversion, and UnitConversionError::NonFinite for a value that is not finite.