示例#1
0
 private TimeSpan GetTotalRaceTime()
 {
     // The total race time is the sum of all laps time
     return(LapRaces.Select(lr => lr.TimeDuration).Aggregate((sum, time) => sum + time));
 }
示例#2
0
        private double GetMeanVelocity()
        {
            var velocitySum = LapRaces.Select(lr => lr.MeanVelocity).Sum();

            return(velocitySum / LapRaces.Count);
        }