mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 01:05:35 +08:00
Move Math constants into class (to be consistent with other constants), tested against minGW / gcc 4.7.2 and fixed various issues (mainly initializer lists, unused variables). BlackMisc compiles now in MinGW, but still issues (especially with qDebug() friend methods)
This commit is contained in:
@@ -233,10 +233,10 @@ private:
|
||||
bool m_isSiBaseUnit; //!< SI base unit?
|
||||
double m_conversionFactorToSIConversionUnit; //!< factor to convert to SI, set to 0 if not applicable (rare cases, e.g. temperature)
|
||||
double m_epsilon; //!< values with differences below epsilon are the equal
|
||||
qint32 m_displayDigits; //!< standard rounding for string conversions
|
||||
int m_displayDigits; //!< standard rounding for string conversions
|
||||
CMeasurementPrefix m_multiplier; //!< multiplier (kilo, Mega)
|
||||
UnitConverter m_toSiConverter; //! allows an arbitrary conversion method as per object
|
||||
UnitConverter m_fromSiConverter; //! allows an arbitrary conversion method as per object
|
||||
UnitConverter m_toSiConverter; //! allows an arbitrary conversion method as per object
|
||||
|
||||
protected:
|
||||
/*!
|
||||
@@ -479,6 +479,17 @@ public:
|
||||
*/
|
||||
double epsilonUpRounding(double value) const;
|
||||
|
||||
/*!
|
||||
* \brief Is given value <= epsilon?
|
||||
* \param checkValue
|
||||
* \return
|
||||
*/
|
||||
bool isEpsilon(double checkValue) const
|
||||
{
|
||||
if (checkValue == 0) return true;
|
||||
return abs(checkValue) <= this->m_epsilon;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// -- static
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user