mass library

Provides type-safe units for Mass.

Import this file to use Mass quantities and their extensions on num (like 70.kg, 500.g).

Classes

Mass
Represents a quantity of mass.
Quantity<T extends Unit<T>>
An abstract representation of a physical quantity, encapsulating a numerical value and a specific unit of measurement.
Unit<T extends Unit<T>>
A contract for all unit enums.

Enums

MassUnit
Represents units of mass.

Extensions

MassCreation on num
Provides convenient factory methods for creating Mass instances from num using getter properties named after common unit symbols or names.
MassValueGetters on Mass
Provides convenient access to Mass values in specific units using getter properties.