From: James Turner Date: Sat, 14 Aug 2010 18:29:02 +0000 (+0100) Subject: Really fix bug 146 - angle units confusiuon. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a363da927480226dd8fbe893e59c5f69da466d56;p=flightgear.git Really fix bug 146 - angle units confusiuon. --- diff --git a/src/Cockpit/cockpit.cxx b/src/Cockpit/cockpit.cxx index 2669ca1f8..a2f542cbc 100644 --- a/src/Cockpit/cockpit.cxx +++ b/src/Cockpit/cockpit.cxx @@ -26,6 +26,7 @@ #endif #include +#include #include #include @@ -245,7 +246,8 @@ float get_climb_rate( void ) float get_view_direction( void ) { double view_off = 360.0 - globals->get_current_view()->getHeadingOffset_deg(); - double view = SGMiscd::normalizeAngle2(fgGetDouble("/orientation/heading-deg") + view_off); + double view = fgGetDouble("/orientation/heading-deg") + view_off; + SG_NORMALIZE_RANGE(view, 0.0, 360.0); return view; }