Dimension constructor

Dimension(
  1. double value,
  2. Unit unit,
  3. UnitType dimensionUnitType
)

Implementation

Dimension(
  this.value,
  this.unit,
  UnitType dimensionUnitType,
) : assert(
        dimensionUnitType.matches(unit.unitType),
        "This Dimension was given a Unit "
        "that isn't specified.",
      );