npm.nicfv.com

    Contains information for an attribute.

    Hierarchy

    Index

    Constructors

    • Define a new attribute.

      Parameters

      • exponents: Attribute.Exponents

        The exponents of the attributes that make up this type

      • latex: string = ''

        A valid LaTeX equation representing this attributes

      • Optionalbase: Dimension.Name

        Determines the base dimension measured by this type (overrides exponents)

      Returns Attribute.Attribute

    Properties

    dimension: Dimension.Dimension

    Contains the base dimensions for this attribute.

    Methods

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

      Parameters

      • other: Attribute.Attribute

        Another compount

      • factor: number

        The factor to use on the other compound

      Returns Exponents<Attribute.Name>

      The combination of the two compounds

    • Determine the exponent on the specified unit or dimension.

      Parameters

      • exponent: Attribute.Name

        The unit or dimension to retrieve the exponent from

      Returns number

      The exponent

    • Return the common attribute name for this type, or undefined if none exist.

      Returns undefined | Attribute.Name

      The common attribute name, if one exists

    • Generate an array of nonzero exponent units or dimensions.

      Returns Attribute.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: Attribute.Attribute

        Another compound fraction

      • exponent: number

        The exponent to apply on the other compound

      Returns Attribute.Attribute

      The product of the two compounds

    • Determine the equivalent attribute type, else return this object.

      Returns Attribute.Attribute

      The equivalent attribute type, if one exists

      `mass` * `velocity^2` => `energy`
      `time` * `time` => `time^2` // no equivalent
    • Generate valid LaTeX code representing this compound.

      Returns string

      A valid LaTeX equation

    MMNEPVFCICPMFPCPTTAAATR