@neutrium/quantity - v5.0.0
    Preparing search index...

    Interface QuantityDefinition

    Scalar and counted units produced by a parser or accepted by Quantity. Import from @neutrium/quantity/core. Empty arrays represent unity. Construction copies and freezes external unit records; duplicate records on each side are coalesced without expanding exponents into repeated tokens.

    const area = new Quantity({
    scalar: new Decimal(2),
    numerator: [{ unit: '<meter>', prefix: '<kilo>', exponent: 2 }],
    denominator: []
    });
    area.units(); // "km2"
    interface QuantityDefinition {
        denominator: readonly UnitPower[];
        numerator: readonly UnitPower[];
        scalar: ScientificDecimal;
    }

    Hierarchy

    Index
    denominator: readonly UnitPower[]

    Counted denominator units.

    numerator: readonly UnitPower[]

    Counted numerator units.

    scalar: ScientificDecimal

    Numerical value in the specified units.