::hwat::utils::ConvertUnits

Converts units from one format to another.

Syntax

::hwat::utils::ConvertUnits:: units_in units_out {base_value 1}

Arguments

Units_in
A string that describes the units you want to convert from.
Units_out
A string that describes the units you want to convert to.
base_value
Value of the "from" to convert to the "to".
Optional.

Returns

Success
The conversion value to multiply the “in” values by to get the “out” value.
Failure
{}

Example

::hwat::utils::ConvertUnits “4 mph” “mm\/ms”

Comments

Be sure to escape any forward slashes with a preceding backslash.

Not passing a base_value is the same as passing 1 for the base_value.