Function unit
Creates a new monodimensional unit as a QVariant.
Parameters
Name | Description |
---|---|
N | The numeric type of the value part of the quantity. |
dimSymbol | The symbol of the dimension of this quantity. |
rank | The rank of the dimensions of this quantity in the dimension vector, when combining this quantity with other oned. |
Example
enum meter = unit!double("L", 1);
enum kilogram = unit!double("M", 2);
// Dimensions will be in this order: L M