]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/metar_main.cxx
Merge branch 'zan/stencil2' into next
[flightgear.git] / src / Main / metar_main.cxx
index 40784732ee6bee625fab001febf37dd8f42f0901..d150b65267097f027dce01302e0db4d10a01f766 100644 (file)
@@ -22,7 +22,9 @@
 
 #include <iomanip>
 #include <sstream>
+#include <iostream>
 #include <string.h>
+#include <time.h>
 
 #include <simgear/debug/logstream.hxx>
 #include <simgear/environment/metar.hxx>
@@ -75,7 +77,7 @@ const char *azimuthName(double d)
 double rnd(double r, int g = 0)
 {
        double f = pow(10.0, g);
-       return f * rint(r / f);
+       return f * floor(r / f + 0.5);
 }