Module cpc::units[][src]

Expand description

Units, and functions you can use with them

Enums

A Unit enum. Note that it can also be NoUnit.

An enum of all possible unit types, like Length, DigitalStorage etc. There is also a NoType unit type for normal numbers.

Functions

Return the sum of two Numbers

Convert a Number to a specified Unit.

If one of two provided Numbers has a larger Unit than the other, convert the large one to the unit of the small one.

Divide a Number by another Number

Returns the conversion factor between two units.

Modulo a Number by another Number.

Multiply two Numbers

Returns a Number to the power of another Number

Subtract a Number from another Number

Convert a Number to an ideal Joule unit, if the number is a unit of Energy.

Convert a Number to an ideal unit.