UnitConverter Class
The unit convertor is responsible for performing unit conversion between values.
Units are represented by their natural texture unit representation (m/s, km/s, n/m, etc).
Methods
convert
(
Number
static
-
value
-
inUnit
-
outUnit
Convert a unit form one input unit to another unit.
Parameters:
-
value
NumberInput value to be converted.
-
inUnit
NumberInput original unit.
-
outUnit
NumberInput output unit.
Returns:
Number:
Retuns the value converted based on input and output units, if the value cannot be converted returns null.