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:
Klaus Basan
2013-04-29 16:00:41 +02:00
parent 7c7ca2dfae
commit c6426a0759
48 changed files with 1034 additions and 920 deletions

View File

@@ -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
// --------------------------------------------------------------------