public TransitionLosses(List <TransitionLoss> losses, MassType massType) { // Make sure losses are always in a consistent order, ascending my mass if (losses.Count > 1) { losses.Sort((l1, l2) => Comparer <double> .Default.Compare(l1.Mass, l2.Mass)); } _losses = new OneOrManyList <TransitionLoss>(losses); MassType = massType; Mass = CalcLossMass(Losses); }
public TransitionLosses(List<TransitionLoss> losses, MassType massType) { // Make sure losses are always in a consistent order, ascending my mass if (losses.Count > 1) losses.Sort((l1, l2) => Comparer<double>.Default.Compare(l1.Mass, l2.Mass)); _losses = new OneOrManyList<TransitionLoss>(losses); MassType = massType; Mass = CalcLossMass(Losses); }