getConversion Method

Compute the conversion factors from fromUnit to toUnit. Handles normal units, inverted units, and mixed (inverted ↔ non-inverted) conversions.

getConversion(fromUnit: UnitProps, toUnit: UnitProps): Promise<UnitConversionProps>

@returns A UnitConversionProps with factor, offset, and optionally inversion and error.

Parameter Type Description
fromUnit UnitProps The source unit.
toUnit UnitProps The target unit.

Returns - Promise<UnitConversionProps>

A UnitConversionProps with factor, offset, and optionally inversion and error.

Defined in

Last Updated: 08 July, 2026