unit

Creates a new monodimensional unit as a Quantity.

unit
(
N
string dimSymbol
size_t rank = size_t.max
)
()

Parameters

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.

Examples

enum meter = unit!(double, "L", 1);
enum kilogram = unit!(double, "M", 2);
// Dimensions will be in this order: L M

Meta