Orbit.cpp   Orbit.cpp 
skipping to change at line 387 skipping to change at line 387
{ {
return period; return period;
} }
double EllipticalOrbit::getBoundingRadius() const double EllipticalOrbit::getBoundingRadius() const
{ {
// TODO: watch out for unbounded parabolic and hyperbolic orbits // TODO: watch out for unbounded parabolic and hyperbolic orbits
return pericenterDistance * ((1.0 + eccentricity) / (1.0 - eccentricity )); return pericenterDistance * ((1.0 + eccentricity) / (1.0 - eccentricity ));
} }
void EllipticalOrbit::sample(double start, double t, int nSamples, void EllipticalOrbit::sample(double, double, int nSamples, OrbitSampleProc&
OrbitSampleProc& proc) const proc) const
{ {
double dE = 2 * M_PI / (double) nSamples; double dE = 2. * M_PI / (double) nSamples;
for (int i = 0; i < nSamples; i++) for (int i = 0; i < nSamples; i++)
proc.sample(positionAtE(dE * i)); proc.sample(positionAtE(dE * i));
} }
Vec3d CachingOrbit::positionAtTime(double jd) const Vec3d CachingOrbit::positionAtTime(double jd) const
{ {
if (jd != lastTime) if (jd != lastTime)
{ {
lastTime = jd; lastTime = jd;
lastPosition = computePosition(jd); lastPosition = computePosition(jd);
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/