Changeset 8531 for trunk/sources/HeuristicLab.Common/3.3
- Timestamp:
- 08/28/12 13:11:15 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Common/3.3/EnumerableStatisticExtensions.cs
r7259 r8531 105 105 106 106 public static IEnumerable<double> LimitToRange(this IEnumerable<double> values, double min, double max) { 107 if (min > max) throw new ArgumentException(string.Format("Minimum {0} is larger than maximum {1}.", min, max)); 107 108 foreach (var x in values) { 108 109 if (double.IsNaN(x)) yield return (max + min) / 2.0;
Note: See TracChangeset
for help on using the changeset viewer.