length library

Provides type-safe units for Length.

Import this file to use Length quantities and their extensions on num (like 10.m, 5.ft).

Classes

AffineQuantity<T extends Unit<T>, Q extends AffineQuantity<T, Q>>
Base class for quantities whose conversions are affine instead of purely multiplicative.
InverseQuantity<T extends Unit<T>, Q extends InverseQuantity<T, Q>>
Base class for quantities whose conversions route through a reciprocal canonical form.
Length
Represents a physical quantity of length.
LinearQuantity<T extends LinearUnit<T>, Q extends LinearQuantity<T, Q>>
An abstract base class for physical quantities with linear (factor-based) unit conversions.
LinearUnit<T extends LinearUnit<T>>
A contract for units that scale linearly (via a simple multiplier).
LogarithmicQuantity<T extends Unit<T>, Q extends LogarithmicQuantity<T, Q>>
Base class for quantities that represent logarithmic levels of another physical dimension.
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 base contract for all unit enums.

Enums

LengthUnit
Represents units of length.

Extensions

LengthCreation on num
Provides convenient factory methods for creating Length instances from num using both SI unit symbols and full English words (singular and plural).
LengthValueGetters on Length
Provides convenient access to Length values in specific units using shortened unit names where appropriate.