SpecificVolumeUnits.volumePerMass constructor

SpecificVolumeUnits.volumePerMass(
  1. VolumeUnits vu,
  2. MassUnits mu
)

Constructs an instance based on volume and mass units.

Implementation

SpecificVolumeUnits.volumePerMass(VolumeUnits vu, MassUnits mu)
    : super.misc(vu.valueSI / mu.valueSI) {
  name = '${vu.name} per ${mu.singular}';
  singular = '${vu.singular} per ${mu.singular}';
  convToMKS = vu.valueSI / mu.valueSI;
  abbrev1 = vu.abbrev1 != null && mu.abbrev1 != null
      ? '${vu.abbrev1} / ${mu.abbrev1}'
      : null;
  abbrev2 = vu.abbrev2 != null && mu.abbrev2 != null
      ? '${vu.abbrev2} ${mu.abbrev2}\u{207b}\u{00b9}'
      : null;
  metricBase = false;
  offset = 0.0;
}