mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +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
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user