Many unit conversion programs can be over-complicated, listing far too many conversion types and a wide range of uncommon units. To address this, instead of using strict alphabetical order, the most common conversions will be listed first, with the uncommon ones listed afterwards.
startup()
function of convert.js, add the scheme's name to the unitTypes
arraysetupAnUnit()
, add another case: statement which calls your unit setup function. The position must match the index of the unitTypes
array. (Remember array indexes start at 0, not 1)To add new unit types to an existing scheme, just add new addUnit()
lines.