Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17505


Ignore:
Timestamp:
04/10/20 13:31:52 (5 years ago)
Author:
mkommend
Message:

#2971: Minor change in Interval ctor.

File:
1 edited

Legend:

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

    r17370 r17505  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HEAL.Attic;
    2526using HeuristicLab.Common;
    26 using HEAL.Attic;
    2727
    2828namespace HeuristicLab.Problems.DataAnalysis {
     
    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
    4851      if (lowerBound.IsAlmost(upperBound)) {
    4952        //If the bounds go over zero
     
    6063      }
    6164
    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;
Note: See TracChangeset for help on using the changeset viewer.