SpecificEnergyUnits.lengthTime constructor

SpecificEnergyUnits.lengthTime(
  1. LengthUnits lu,
  2. TimeUnits tu
)

Constructs a instance based on length and time units.

Implementation

SpecificEnergyUnits.lengthTime(LengthUnits lu, TimeUnits tu)
    : super.misc(lu.valueSI * lu.valueSI / (tu.valueSI * tu.valueSI)) {
  name = '${lu.name} squared per ${tu.singular} squared';
  singular = '${lu.singular} squared per ${tu.singular} squared';
  convToMKS = lu.valueSI * lu.valueSI / (tu.valueSI * tu.valueSI);
  abbrev1 = lu.abbrev1 != null && tu.abbrev1 != null
      ? '${lu.abbrev1} sq./ ${tu.abbrev1} sq.'
      : null;
  abbrev2 = lu.abbrev2 != null && tu.abbrev2 != null
      ? '${lu.abbrev2}^2/${tu.abbrev2}^2'
      : null;
  metricBase = false;
  offset = 0.0;
}