1
0
Fork 0

Really fix bug 146 - angle units confusiuon.

This commit is contained in:
James Turner 2010-08-14 19:29:02 +01:00
parent 6266491aea
commit a363da9274

View file

@ -26,6 +26,7 @@
#endif #endif
#include <simgear/compiler.h> #include <simgear/compiler.h>
#include <simgear/sg_inlines.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
@ -245,7 +246,8 @@ float get_climb_rate( void )
float get_view_direction( void ) float get_view_direction( void )
{ {
double view_off = 360.0 - globals->get_current_view()->getHeadingOffset_deg(); 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; return view;
} }