Defines the class for units of measurement for physical quantities.

Hierarchy

Constructors

Properties

attribute: Attribute.Attribute

The physical attribute measured by this unit.

scale: number

The scale of this unit relative to the base unit.

Methods

  • Combine two compounds by applying a factor on the second compound.

    Parameters

    • other: Unit.Unit

      Another compount

    • factor: number

      The factor to use on the other compound

    Returns Exponents<Unit.Name>

    The combination of the two compounds

  • Determine the exponent on the specified unit or dimension.

    Parameters

    • exponent: Unit.Name

      The unit or dimension to retrieve the exponent from

    Returns number

    The exponent

  • Generate an array of nonzero exponent units or dimensions.

    Returns Unit.Name[]

    An array of nonzero exponent units or dimensions

  • Determine whether two compounds contain the same units or dimensions.

    Parameters

    Returns boolean

    A boolean

  • Multiply this compound by another after applying an exponent on the second compound.

    Parameters

    • other: Unit.Unit

      Another compound fraction

    • exponent: number

      The exponent to apply on the other compound

    Returns Unit.Unit

    The product of the two compounds

  • Generate valid LaTeX code representing this compound.

    Returns string

    A valid LaTeX equation

MMNEPVFCICPMFPCPTTAAATR