Пример #1
0
        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);
        }
Пример #2
0
        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);
        }