Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Mass

Represents a mass with an associated value and mass unit.

Hierarchy

  • Mass

Index

Constructors

constructor

  • Parameters

    Returns Mass

Methods

getKilograms

  • getKilograms(): number
  • Returns the value of the mass, in kilograms.

    Returns number

getUnit

  • Returns the unit of the mass.

    Returns MassUnit

getValue

  • Returns the value of the mass, in a given mass unit.

    Parameters

    Returns number

Static fromKilograms

  • Converts the weight from kilograms into the mass unit supplied.

    Parameters

    Returns Mass

Static toKilograms

  • toKilograms(value: number, unit: MassUnit): number
  • Converts the mass from the unit supplied into kilograms.

    Parameters

    Returns number

Generated using TypeDoc