mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 04:25:42 +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:
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user