Changeset 5720 for branches/DataAnalysis Refactoring/HeuristicLab.Common
- Timestamp:
- 03/16/11 17:13:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Common/3.3/EnumerableStatisticExtensions.cs
r5699 r5720 106 106 public static IEnumerable<double> LimitToRange(this IEnumerable<double> values, double min, double max) { 107 107 foreach (var x in values) { 108 if (double.IsNaN(x)) yield return max;108 if (double.IsNaN(x)) yield return (max + min) / 2.0; 109 109 else if (x < min) yield return min; 110 110 else if (x > max) yield return max;
Note: See TracChangeset
for help on using the changeset viewer.