Changeset 5618 for branches/DataAnalysis Refactoring/HeuristicLab.Common/3.3/EnumerableStatisticExtensions.cs
- Timestamp:
- 03/07/11 14:23:26 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Common/3.3/EnumerableStatisticExtensions.cs
r5551 r5618 110 110 public static IEnumerable<double> LimitToRange(this IEnumerable<double> values, double min, double max) { 111 111 foreach (var x in values) { 112 if (double.IsNaN(x)) yield return x;112 if (double.IsNaN(x)) yield return max; 113 113 else if (x < min) yield return min; 114 114 else if (x > max) yield return max;
Note: See TracChangeset
for help on using the changeset viewer.