* ./hurricane :

- New: ability to shrink bounds of an Interval.
This commit is contained in:
Jean-Paul Chaput 2009-04-07 15:22:04 +00:00
parent f2fa2bf4c1
commit d1ce1ce975
2 changed files with 18 additions and 0 deletions

View File

@ -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)
// ****************************************
{

View File

@ -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);