mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:07:01 +08:00
fixed bug when compiling with MinGW:
CPhysicalQuantity::operator== used the wrong abs() so it was only comparing integers
This commit is contained in:
@@ -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
|
template <class MU, class PQ> bool CPhysicalQuantity<MU, PQ>::operator ==(const CPhysicalQuantity<MU, PQ> &other) const
|
||||||
{
|
{
|
||||||
if (this == &other) return true;
|
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();
|
return diff <= this->m_unit.getEpsilon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user