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
+4 -4
View File
@@ -81,8 +81,8 @@ public:
double getRightAscension(); double getRightAscension();
double getDeclination(); double getDeclination();
double getMagnitude(); double getMagnitude();
double getLon(); double getLon() const;
double getLat(); double getLat() const;
void updatePosition(double mjd, Star *ourSun); 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::getDeclination() { return declination; }
inline double CelestialBody::getMagnitude() { return magnitude; } inline double CelestialBody::getMagnitude() { return magnitude; }
inline double CelestialBody::getLon() inline double CelestialBody::getLon() const
{ {
return lonEcl; return lonEcl;
} }
inline double CelestialBody::getLat() inline double CelestialBody::getLat() const
{ {
return latEcl; return latEcl;
} }
+14 -14
View File
@@ -43,47 +43,47 @@ public:
Star (); Star ();
~Star(); ~Star();
void updatePosition(double mjd); void updatePosition(double mjd);
double getM(); double getM() const;
double getw(); double getw() const;
double getxs(); double getxs() const;
double getys(); double getys() const;
double getye(); double getye() const;
double getze(); double getze() const;
double getDistance(); double getDistance() const;
}; };
inline double Star::getM() inline double Star::getM() const
{ {
return M; return M;
} }
inline double Star::getw() inline double Star::getw() const
{ {
return w; return w;
} }
inline double Star::getxs() inline double Star::getxs() const
{ {
return xs; return xs;
} }
inline double Star::getys() inline double Star::getys() const
{ {
return ys; return ys;
} }
inline double Star::getye() inline double Star::getye() const
{ {
return ye; return ye;
} }
inline double Star::getze() inline double Star::getze() const
{ {
return ze; return ze;
} }
inline double Star::getDistance() inline double Star::getDistance() const
{ {
return distance; return distance;
} }