[Kstars-devel] branches/KDE/4.3/kdeedu/kstars/kstars/skyobjects
Akarsh Simha
akarshsimha at gmail.com
Tue Oct 6 19:38:24 CEST 2009
SVN commit 1032036 by asimha:
Backporting fix to bug #209646
CCMAIL: kstars-devel at kde.org
CCBUG: 209646
M +2 -2 ksmoon.cpp
M +1 -1 ksmoon.h
--- branches/KDE/4.3/kdeedu/kstars/kstars/skyobjects/ksmoon.cpp #1032035:1032036
@@ -220,8 +220,8 @@
}
void KSMoon::findPhase() {
- KSSun *Sun = (KSSun*)KStarsData::Instance()->skyComposite()->findByName( "Sun" ); // TODO: Get rid of this ugly thing by making KSSun singleton.
- Phase = ecLong()->Degrees() - Sun->ecLong()->Degrees();
+ KSSun *Sun = (KSSun*)KStarsData::Instance()->skyComposite()->findByName( "Sun" );
+ Phase = ecLong()->Degrees() - Sun->ecLong()->Degrees(); // Phase is obviously in degrees
double DegPhase = dms( Phase ).reduce().Degrees();
int iPhase = int( 0.1*DegPhase+0.5 );
if (iPhase==36) iPhase = 0;
--- branches/KDE/4.3/kdeedu/kstars/kstars/skyobjects/ksmoon.h #1032035:1032036
@@ -54,7 +54,7 @@
/**@return the illuminated fraction of the Moon as seen from Earth
*/
- double illum( void ) const { return 0.5*(1.0 - cos( Phase * 180.0 / dms::PI ) ); }
+ double illum( void ) const { return 0.5*(1.0 - cos( Phase * dms::PI / 180.0 ) ); }
/**@return a short string describing the moon's phase
*/
More information about the Kstars-devel
mailing list