The Unit class represents the units for a measure.

It is important to note that the Unit.ONE value is considered to be equivalent to the absence of a Unit instance or undefined. For this reason, it is convenient to use the static methods when comparing or computing with the Unit class.

Properties

dimensions: Dimensions
labels: string[]
multiplier: number
AMPERE: Unit

Unit of electric current. The ampere is that constant current which, if maintained in two straight parallel conductors of infinite length, of negligible circular cross-section, and placed 1 meter apart in vacuum, would produce between these conductors a force equal to 2 x 10-7 newton per meter of length.

CANDELA: Unit

Unit of luminous intensity. The candela is the luminous intensity, in a given direction, of a source that emits monochromatic radiation of frequency 540 x 1012 hertz and that has a radiant intensity in that direction of 1/683 watt per steradian.

COULOMB: Unit

Unit of electric charge.

FRICTION_COEFFICIENT: Unit

The unit for a Friction Coefficient, Ns/m.

INV_SECOND: Unit

The unit of angular velocity.

JOULE: Unit
JOULE_SECOND: Unit

The unit of angular momentum.

KELVIN: Unit

Unit of thermodynamic temperature. The kelvin, unit of thermodynamic temperature, is the fraction 1/273.16 of the thermodynamic temperature of the triple point of water.

KILOGRAM: Unit

Unit of mass. The kilogram is the unit of mass; it is equal to the mass of the international prototype of the kilogram.

KILOGRAM_METER_PER_SECOND: Unit

The unit of linear momentum.

KILOGRAM_METER_SQUARED: Unit

The unit of moment of inertia.

METER: Unit

Unit of length. The meter is the length of the path travelled by light in vacuum during a time interval of 1/299 792 458 of a second.

MOLE: Unit

Unit of amount of substance.

  1. The mole is the amount of substance of a system which contains as many elementary entities as there are atoms in 0.012 kilogram of carbon 12; its symbol is "mol."
  2. When the mole is used, the elementary entities must be specified and may be atoms, molecules, ions, electrons, other particles, or specified groups of such particles.
NEWTON: Unit
ONE: Unit

Internal symbolic constant to improve code readability. May be undefined or an instance of Unit.

SECOND: Unit

Unit of time. The second is the duration of 9 192 631 770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the cesium 133 atom.

STIFFNESS: Unit

The unit for a Spring constant, N/m.

Methods

  • Computes the unit equal to this / rhs.

    Parameters

    Returns Unit

  • Returns boolean

  • Computes the unit equal to this * rhs.

    Parameters

    Returns Unit

  • Parameters

    • Optional fractionDigits: number
    • Optional compact: boolean

    Returns string

  • Parameters

    • Optional fractionDigits: number
    • Optional compact: boolean

    Returns string

  • Parameters

    • Optional precision: number
    • Optional compact: boolean

    Returns string

  • Parameters

    • Optional radix: number
    • Optional compact: boolean

    Returns string

  • Parameters

    • uom: Unit

      The unit of measure that must be dimensionless.

    Returns void

  • Parameters

    Returns Unit

  • Parameters

    Returns Unit

  • Computes the multiplicative inverse of the specified unit of measure.

    Parameters

    Returns Unit

  • Parameters

    Returns boolean

  • Parameters

    • uom: Unit

      The unit of measure.

    Returns boolean

    true if the uom is one or if it is undefined.

  • Parameters

    Returns Unit

  • Parameters

    • name: string
    • uom: Unit

    Returns Unit

  • Computes the value of the unit of measure raised to the specified power.

    Parameters

    Returns Unit

  • Parameters

    Returns Unit

  • Constructs a Unit.

    Parameters

    • multiplier: number
    • dimensions: Dimensions
    • labels: string[]

    Returns Unit

Generated using TypeDoc