Skip to content
martintrojer edited this page Mar 14, 2012 · 17 revisions

Frinj keeps tracks of units, 2 kinds of prefixes and fundamental units.

All fjv's are always normalised to fundamental units to make it possible to add, multiply and convert them.

Fundamentals

* length              m     meter
* mass                kg    kilogram
* time                s	    second
* current             A	    ampere
* luminous_intensity  cd    candela
* substance           mol   mole
* temperature         K	    Kelvin
* information         bit   bit
* currency            USD   U.S. dollar

It's worth pointing out that these fundamental units are configurable (see units.txt), i.e. not hardcoded.

Prefixes

Prefixes are units-less factors that are multiplied to the units. There are 2 kinds of prefixes, normal and standalone. A normal prefix can only "prefix" a unit name where-as standalone prefix can be used as both a prefix and a unit.

  • :cm is prefix c + unit m. Being 1/100 * m

  • :kilo is a standalone prefix of value 1000

  • :kilobit is 1000 of unit bits

Note that only one prefix can by used before a unit name; :ccm is not centi-centi-meter, but the unit called ccm. (fj :centi :cm) is a centi-cent-meter

Units

Most of the units come in both singular and plural form. So :meter and :meters is the same.

Clone this wiki locally