Mass constructor

Mass({
  1. dynamic kg,
  2. dynamic g,
  3. dynamic u,
  4. double uncert = 0.0,
})

Constructs a Mass with kilograms (kg), grams (g) or unified atomic mass units (u). Optionally specify a relative standard uncertainty.

Implementation

Mass({dynamic kg, dynamic g, dynamic u, double uncert = 0.0})
    : super(kg ?? (g ?? (u ?? 0.0)),
          g != null ? Mass.grams : (u != null ? Mass.unifiedAtomicMassUnits : Mass.kilograms), uncert);