X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FTime%2Fsunsolver.cxx;h=b37112816282f1e061219139f600a770087b47ad;hb=da73dd97d3d0e36b6078728ac39f0b98cae46ff7;hp=4bad897c92f7c9342e4b78523dccde4cefb9a04d;hpb=3abf0b5df1bf2aae1c693b4c6e8d2aed9aa67548;p=flightgear.git diff --git a/src/Time/sunsolver.cxx b/src/Time/sunsolver.cxx index 4bad897c9..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,12 +97,12 @@ 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 = " - << sun_anglei_deg ); + << sun_angle_deg ); return sun_angle_deg; }