JavaScript
A5.u.mathconvert Method
Syntax
A5.u.math.convert(value,unitFrom,unitTo)
Arguments
- valuenumber
The value in the "from" units.
- unitFromstring
The unit to convert from.
- unitTostring
The unit to convert to.
Returns
- allowedboolean
Can the units be converted.
Description
Convert a value from one unit to another.
Discussion
This method will return the value after it has been converted to the new units.
Example
var temp = A5.u.math.convert(10,'C','F'); // temp = 50 var mass = A5.u.math.convert(2,'lb','kg'); // mass = 0.907184