Had to withdraw 3Vector3D, since they store values internally as float (idiotic design). Hence qreal will be dropped. Started with Unit tests.

This commit is contained in:
Klaus Basan
2013-04-20 17:46:46 +02:00
parent 7b0468d300
commit f4affe55ef
28 changed files with 446 additions and 183 deletions

View File

@@ -34,9 +34,9 @@ private:
* \brief Equatorial radius of WGS84 ellipsoid (6378137 m)
* \return
*/
static const qreal &EarthRadiusMeters()
static const double &EarthRadiusMeters()
{
static qreal erm = 6378137.0;
static double erm = 6378137.0;
return erm;
}
@@ -44,9 +44,9 @@ private:
* \brief Flattening of WGS84 ellipsoid (1/298.257223563)
* \return
*/
static const qreal &Flattening()
static const double &Flattening()
{
static qreal f = 1 / 298.257223563;
static double f = 1 / 298.257223563;
return f;
}
@@ -54,9 +54,9 @@ private:
* \brief First eccentricity squared
* \return
*/
static const qreal &e2()
static const double &e2()
{
static qreal e2 = (Flattening() * (2 - Flattening()));
static double e2 = (Flattening() * (2 - Flattening()));
return e2;
}
@@ -64,9 +64,9 @@ private:
* \brief First eccentricity to power of four
* \return
*/
static const qreal &e4()
static const double &e4()
{
static qreal e4 = BlackMisc::Math::CMath::square(e2());
static double e4 = BlackMisc::Math::CMath::square(e2());
return e4;
}
@@ -74,9 +74,9 @@ private:
* \brief First eccentricity squared absolute
* \return
*/
static const qreal &e2abs()
static const double &e2abs()
{
static qreal e2abs = abs(e2());
static double e2abs = abs(e2());
return e2abs;
}
@@ -84,9 +84,9 @@ private:
* \brief Eccentricity e2m
* \return
*/
static const qreal &e2m()
static const double &e2m()
{
static qreal e2m = BlackMisc::Math::CMath::square(1 - Flattening());
static double e2m = BlackMisc::Math::CMath::square(1 - Flattening());
return e2m;
}