Ignore:
Timestamp:
05/14/20 15:39:00 (8 weeks ago)
Author:
chaider
Message:

#2971 fixed bounds check in interval cstr

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/Interval.cs

    r17505 r17542  
    4646    /// <param name="upperBound">Upper bound of the interval</param>
    4747    public Interval(double lowerBound, double upperBound) {
    48       if (lowerBound > upperBound)
    49         throw new ArgumentException("lowerBound must be smaller than or equal to upperBound.");
    50 
    5148      if (lowerBound.IsAlmost(upperBound)) {
    5249        //If the bounds go over zero
     
    6360      }
    6461
     62      if (lowerBound > upperBound)
     63        throw new ArgumentException("lowerBound must be smaller than or equal to upperBound.");
     64
    6565      this.LowerBound = lowerBound;
    6666      this.UpperBound = upperBound;
     
    7777      return false;
    7878    }
     79
     80
    7981
    8082    public override string ToString() {
Note: See TracChangeset for help on using the changeset viewer.