API Reference > imodeljs-Quantity > Quantity > Quantity Quantity Class Beta The Quantity class is convenient container to specify both the magnitude and unit of a quantity. This class is commonly returned as the result of parsing a string that represents a quantity. Implements QuantityProps Methods Name Description constructor(unit?: UnitProps, magnitude?: number): Quantity Constructor. convertTo(toUnit: UnitProps, conversion: UnitConversion): undefined | Quantity Convert a Quantity to the specified unit given the UnitConversion. Properties Name Type Description _isValid Protected boolean _magnitude Protected number _unit Protected UnitProps isValid Accessor ReadOnly boolean magnitude Accessor ReadOnly number unit Accessor ReadOnly UnitProps Defined in quantity/src/Quantity.ts Line 15 Last Updated: 29 November, 2022