1
0
Fork 0

fix a typo

This commit is contained in:
Erik Hofman 2012-01-09 08:14:46 +01:00
parent fdbdbfe93d
commit 699f4eeb38
2 changed files with 6 additions and 6 deletions

View file

@ -433,8 +433,8 @@ void FGLight::updateSunPos()
SGVec3d nup = normalize(world_up); SGVec3d nup = normalize(world_up);
_sun_angle = acos( dot( nup, nsun ) ); _sun_angle = acos( dot( nup, nsun ) );
double signnedPI = (_sun_angle < 0.0) ? -SGD_PI : SGD_PI; double signedPI = (_sun_angle < 0.0) ? -SGD_PI : SGD_PI;
_sun_angle = fmod(_sun_angle+signnedPI, SGD_2PI) - signnedPI; _sun_angle = fmod(_sun_angle+signedPI, SGD_2PI) - signedPI;
SG_LOG( SG_EVENT, SG_DEBUG, "sun angle relative to current location = " SG_LOG( SG_EVENT, SG_DEBUG, "sun angle relative to current location = "
<< get_sun_angle() ); << get_sun_angle() );

View file

@ -66,8 +66,8 @@ void fgSunPositionGST(double gst, double *lon, double *lat) {
tmp = ra - (SGD_2PI/24)*gst; tmp = ra - (SGD_2PI/24)*gst;
double signnedPI = (tmp < 0.0) ? -SGD_PI : SGD_PI; double signedPI = (tmp < 0.0) ? -SGD_PI : SGD_PI;
tmp = fmod(tmp+signnedPI, SGD_2PI) - signnedPI; tmp = fmod(tmp+signedPI, SGD_2PI) - signedPI;
*lon = tmp; *lon = tmp;
*lat = dec; *lat = dec;
@ -97,8 +97,8 @@ static double sun_angle( const SGTime &t, const SGVec3d& world_up,
double sun_angle = acos( dot( nup, nsun ) ); double sun_angle = acos( dot( nup, nsun ) );
double signnedPI = (sun_angle < 0.0) ? -SGD_PI : SGD_PI; double signedPI = (sun_angle < 0.0) ? -SGD_PI : SGD_PI;
sun_angle = fmod(sun_angle+signnedPI, SGD_2PI) - signnedPI; sun_angle = fmod(sun_angle+signedPI, SGD_2PI) - signedPI;
double sun_angle_deg = sun_angle * SG_RADIANS_TO_DEGREES; double sun_angle_deg = sun_angle * SG_RADIANS_TO_DEGREES;
SG_LOG( SG_EVENT, SG_DEBUG, "sun angle relative to current location = " SG_LOG( SG_EVENT, SG_DEBUG, "sun angle relative to current location = "