refs #197 fixing (hopefully) comparison between null quantities

and related rationalization of PQ comparison.
This commit is contained in:
Mathew Sutcliffe
2014-04-08 16:55:11 +01:00
committed by Klaus Basan
parent 8ba2badb61
commit a4e3ac6f40
5 changed files with 33 additions and 11 deletions

View File

@@ -109,13 +109,20 @@ namespace BlackMisc
//! \brief Value in current unit
double value() const
{
if (this->isNull())
{
return 0.0;
}
return this->m_value;
}
//! \brief Set value in current unit
void setCurrentUnitValue(double value)
{
this->m_value = value;
if (! this->isNull())
{
this->m_value = value;
}
}
//! \brief Rounded value in given unit