diff --git a/interval/intervalNe.cpp b/interval/intervalNe.cpp index e72b1f7..fa31be8 100644 --- a/interval/intervalNe.cpp +++ b/interval/intervalNe.cpp @@ -32,10 +32,10 @@ interval interval_algebra::Ne(const interval& x, const interval& y) return {}; } if ((x.hi() < y.lo()) || x.lo() > y.hi()) { - return interval{1,1,0}; + return interval{1, 1, 0}; } - if ((x.hi() == y.lo()) || x.lo() == y.hi()) { - return interval{0,0,0}; + if ((x.hi() == y.lo()) && x.lo() == y.hi()) { + return interval{0, 0, 0}; } return {0, 1, 0}; }