npm.nicfv.com
    Preparing search index...

    Class Quantity

    Represents a physical, measurable quantity.

    Index

    Constructors

    • Define a new quantity.

      Parameters

      • quantity: number

        The numeric value of the quanity

      • units: Unit

        The units of this quantity

      Returns Quantity

    Properties

    quantity: number

    The numeric value of the quanity

    units: Unit

    The units of this quantity

    Methods

    • Convert this quantity to another unit system. Dimensions must be identical between the two unit systems.

      Parameters

      • units: Unit

        Units to convert to

      Returns Quantity

      This quantity in a different unit system

    • Raise this quantity to an exponent.

      Parameters

      • exponent: number

        The exponent

      Returns Quantity

      The power

    • Scale this quantity by a constant factor.

      Parameters

      • factor: number

        A scalar

      Returns Quantity

      A scaled quantity

    • Convert this quantity into LaTeX code.

      Returns string

      LaTeX code for this quantity