Converts a quantity from its current unit to a common unit of mass or volume. This is to make it easier to compare quantities of different units.
The quantity to convert
The unit of measure of the quantity
The converted quantity in its base unit
toBaseQuantity(1, UOM.KM) // Returns 1000 (meters)toBaseQuantity(1, UOM.LB) // Returns 453.592 (grams)toBaseQuantity(1, UOM.G) // Returns 1 (no conversion needed) Copy
toBaseQuantity(1, UOM.KM) // Returns 1000 (meters)toBaseQuantity(1, UOM.LB) // Returns 453.592 (grams)toBaseQuantity(1, UOM.G) // Returns 1 (no conversion needed)
Converts a quantity from its current unit to a common unit of mass or volume. This is to make it easier to compare quantities of different units.