mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 19:35:33 +08:00
refs #197 fixing (hopefully) comparison between null quantities
and related rationalization of PQ comparison.
This commit is contained in:
committed by
Klaus Basan
parent
8ba2badb61
commit
a4e3ac6f40
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user