fixed bug when compiling with MinGW:

CPhysicalQuantity::operator== used the wrong abs() so it was only comparing integers
This commit is contained in:
Mathew Sutcliffe
2013-09-16 23:12:41 +01:00
parent 3e0c38b921
commit 8844774fbe

View File

@@ -24,7 +24,7 @@ template <class MU, class PQ> CPhysicalQuantity<MU, PQ>::CPhysicalQuantity(doubl
template <class MU, class PQ> bool CPhysicalQuantity<MU, PQ>::operator ==(const CPhysicalQuantity<MU, PQ> &other) const
{
if (this == &other) return true;
double diff = abs(this->m_value - other.value(this->m_unit));
double diff = std::abs(this->m_value - other.value(this->m_unit));
return diff <= this->m_unit.getEpsilon();
}