Const-ify some ephemeris accessors, so they can be tied.

This commit is contained in:
James Turner 2010-06-14 10:23:06 +01:00
parent dd044844e5
commit 87169febf8
2 changed files with 18 additions and 18 deletions

View File

@ -81,8 +81,8 @@ public:
double getRightAscension();
double getDeclination();
double getMagnitude();
double getLon();
double getLat();
double getLon() const;
double getLat() const;
void updatePosition(double mjd, Star *ourSun);
};
@ -90,12 +90,12 @@ inline double CelestialBody::getRightAscension() { return rightAscension; }
inline double CelestialBody::getDeclination() { return declination; }
inline double CelestialBody::getMagnitude() { return magnitude; }
inline double CelestialBody::getLon()
inline double CelestialBody::getLon() const
{
return lonEcl;
}
inline double CelestialBody::getLat()
inline double CelestialBody::getLat() const
{
return latEcl;
}

View File

@ -43,47 +43,47 @@ public:
Star ();
~Star();
void updatePosition(double mjd);
double getM();
double getw();
double getxs();
double getys();
double getye();
double getze();
double getDistance();
double getM() const;
double getw() const;
double getxs() const;
double getys() const;
double getye() const;
double getze() const;
double getDistance() const;
};
inline double Star::getM()
inline double Star::getM() const
{
return M;
}
inline double Star::getw()
inline double Star::getw() const
{
return w;
}
inline double Star::getxs()
inline double Star::getxs() const
{
return xs;
}
inline double Star::getys()
inline double Star::getys() const
{
return ys;
}
inline double Star::getye()
inline double Star::getye() const
{
return ye;
}
inline double Star::getze()
inline double Star::getze() const
{
return ze;
}
inline double Star::getDistance()
inline double Star::getDistance() const
{
return distance;
}