pub fn convert(value: &Value, target: UnitId) -> Result<Value, PncError>Expand description
Convert a value to the target unit.
Unitless numbers attach the target unit without changing the value.
Unit-bearing values are converted via affine transform; cross-dimension
conversions return InvalidUnitConversion.