Get the raw numeric value of a value object converted into another compatible unit as a string
The returned value is formatted using FixedPointNumber#getDisplayValue and is without any unit symbols or label
The value object to be converted
The unit to convert into, must be compatible with the value object's unit
The raw numeric value of the converted value object as a formatted string
const value = { value: 1, unit: "m/s" }; const toUnit = "mm/s"; const convertedValue = valueRawConverter(value, toUnit); console.log(convertedValue); // outputs "1000" Copy
const value = { value: 1, unit: "m/s" }; const toUnit = "mm/s"; const convertedValue = valueRawConverter(value, toUnit); console.log(convertedValue); // outputs "1000"
Error if the value object and the provided unit are incompatible
convertValue
Get the raw numeric value of a value object converted into another compatible unit as a string
The returned value is formatted using FixedPointNumber#getDisplayValue and is without any unit symbols or label