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

@@ -1,4 +1,4 @@
/* Copyright (C) 2013 VATSIM Community / authors
/* Copyright (C) 2013 VATSIM Community / contributors
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -47,22 +47,22 @@ public:
*/
virtual ~CAngle() {}
/*!
* \brief Convenience method PI
* \return
*/
static double pi()
{
return double(M_PI);
}
/*!
* \brief Value as factor of PI (e.g. 0.5PI)
* \return
*/
double piFactor() const
{
return BlackMisc::Math::CMath::round(this->convertedSiValueToDouble() / M_PI, 6);
return BlackMisc::Math::CMath::round(this->convertedSiValueToDouble() / BlackMisc::Math::CMath::PI() , 6);
}
/*!
* \brief PI as convenience method
* \return
*/
static const double &PI()
{
return BlackMisc::Math::CMath::PI();
}
};