Energy constructor

Energy({
  1. dynamic J,
  2. dynamic eV,
  3. double uncert = 0.0,
})

Constructs an Energy with joules (J) or electron volts (eV). Optionally specify a relative standard uncertainty.

Implementation

Energy({dynamic J, dynamic eV, double uncert = 0.0})
    : super(J ?? (eV ?? 0.0),
          eV != null ? Energy.electronVolts : Energy.joules, uncert);