CVGalleryGamesPreviewRandomJavaSiteWeb
Site updates
Testing New System now...

Unit Converter

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.

Releases

Adding your own units scheme

  1. In units.js, create a function like the ones already there to set up your units. They should all be relative to the first unit in the list.
  2. In the startup() function of convert.js, add the scheme's name to the unitTypes array
  3. In setupAnUnit(), 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.