convertFrom

open fun convertFrom(magnitude: Double, otherUnit: Unit<U>): Double

Converts a magnitude in terms of another unit of the same dimension to a magnitude in terms of this unit.

  Inches.convertFrom(12, Feet) // 144.0
  Kilograms.convertFrom(2.2, Pounds) // 0.9979024

Return

the corresponding value in terms of this unit.

Parameters

magnitude

a magnitude measured in another unit

otherUnit

the unit to convert the magnitude to