From 699f4eeb386d62602dc6e1c13c00b1ffbdf27294 Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Mon, 9 Jan 2012 08:14:46 +0100 Subject: [PATCH] fix a typo --- src/Time/light.cxx | 4 ++-- src/Time/sunsolver.cxx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Time/light.cxx b/src/Time/light.cxx index 7c502d70e..65a917b1c 100644 --- a/src/Time/light.cxx +++ b/src/Time/light.cxx @@ -433,8 +433,8 @@ void FGLight::updateSunPos() SGVec3d nup = normalize(world_up); _sun_angle = acos( dot( nup, nsun ) ); - double signnedPI = (_sun_angle < 0.0) ? -SGD_PI : SGD_PI; - _sun_angle = fmod(_sun_angle+signnedPI, SGD_2PI) - signnedPI; + double signedPI = (_sun_angle < 0.0) ? -SGD_PI : SGD_PI; + _sun_angle = fmod(_sun_angle+signedPI, SGD_2PI) - signedPI; SG_LOG( SG_EVENT, SG_DEBUG, "sun angle relative to current location = " << get_sun_angle() ); diff --git a/src/Time/sunsolver.cxx b/src/Time/sunsolver.cxx index 6306f65ef..b37112816 100644 --- a/src/Time/sunsolver.cxx +++ b/src/Time/sunsolver.cxx @@ -66,8 +66,8 @@ void fgSunPositionGST(double gst, double *lon, double *lat) { tmp = ra - (SGD_2PI/24)*gst; - double signnedPI = (tmp < 0.0) ? -SGD_PI : SGD_PI; - tmp = fmod(tmp+signnedPI, SGD_2PI) - signnedPI; + double signedPI = (tmp < 0.0) ? -SGD_PI : SGD_PI; + tmp = fmod(tmp+signedPI, SGD_2PI) - signedPI; *lon = tmp; *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 signnedPI = (sun_angle < 0.0) ? -SGD_PI : SGD_PI; - sun_angle = fmod(sun_angle+signnedPI, SGD_2PI) - signnedPI; + double signedPI = (sun_angle < 0.0) ? -SGD_PI : SGD_PI; + sun_angle = fmod(sun_angle+signedPI, SGD_2PI) - signedPI; double sun_angle_deg = sun_angle * SG_RADIANS_TO_DEGREES; SG_LOG( SG_EVENT, SG_DEBUG, "sun angle relative to current location = "