- Timestamp:
- 03/16/11 12:13:16 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Common/3.3/DoubleExtensions.cs
r5445 r5705 24 24 public static class DoubleExtensions { 25 25 public static bool IsAlmost(this double x, double y) { 26 if (double.IsPositiveInfinity(x)) return double.IsPositiveInfinity(y); 27 if (double.IsNegativeInfinity(x)) return double.IsNegativeInfinity(y); 28 26 29 return Math.Abs(x - y) < 1.0E-12; 27 30 }
Note: See TracChangeset
for help on using the changeset viewer.