]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/panel.cxx
A couple more straggling instrumentation clean ups.
[flightgear.git] / src / Cockpit / panel.cxx
index 25d6066cab59e60c4a3e8a16b82e2ed5d1520cc8..4134c196cfa91f498c134949798c357a7ac19d83 100644 (file)
 #include <stdio.h>     // sprintf
 #include <string.h>
 
+#include <simgear/compiler.h>
+
+#include SG_GLU_H
+
 #include <plib/ssg.h>
 #include <plib/fnt.h>
 
@@ -53,7 +57,6 @@
 // my hardware/driver requires many more.
 #define POFF_UNITS 4
 
-\f
 ////////////////////////////////////////////////////////////////////////
 // Local functions.
 ////////////////////////////////////////////////////////////////////////
@@ -1119,7 +1122,7 @@ FGTextLayer::Chunk::getValue () const
       break;
     case DOUBLE_VALUE:
       double d = _offs + _node->getFloatValue() * _mult;
-      if (_trunc)  d = truncf(d);
+      if (_trunc)  d = (d < 0) ? -floor(-d) : floor(d);
       sprintf(_buf, _fmt.c_str(), d);
       break;
     }