diff --git a/hurricane/src/hurricane/Interval.cpp b/hurricane/src/hurricane/Interval.cpp index f7548c4d..27875143 100644 --- a/hurricane/src/hurricane/Interval.cpp +++ b/hurricane/src/hurricane/Interval.cpp @@ -140,6 +140,22 @@ Interval& Interval::makeEmpty() return *this; } +Interval& Interval::shrinkVMin(const DbU::Unit& vMin) +// ************************************************** +{ + if ( vMin > _vMin ) + _vMin = vMin; + return *this; +} + +Interval& Interval::shrinkVMax(const DbU::Unit& vMax) +// ************************************************** +{ + if ( vMax < _vMax ) + _vMax = vMax; + return *this; +} + Interval& Interval::inflate(const DbU::Unit& dv) // **************************************** { diff --git a/hurricane/src/hurricane/hurricane/Interval.h b/hurricane/src/hurricane/hurricane/Interval.h index 0f54e532..1e393f36 100644 --- a/hurricane/src/hurricane/hurricane/Interval.h +++ b/hurricane/src/hurricane/hurricane/Interval.h @@ -71,6 +71,8 @@ class Interval { // ******** public: Interval& makeEmpty(); + public: Interval& shrinkVMin(const DbU::Unit& vMin); + public: Interval& shrinkVMax(const DbU::Unit& vMax); public: Interval& inflate(const DbU::Unit& dv); public: Interval& inflate(const DbU::Unit& dvMin, const DbU::Unit& dvMax); public: Interval& merge(const DbU::Unit& v);