]> git.mxchange.org Git - flightgear.git/commitdiff
Remove truncf() all together.
authorehofman <ehofman>
Fri, 20 Feb 2004 07:54:26 +0000 (07:54 +0000)
committerehofman <ehofman>
Fri, 20 Feb 2004 07:54:26 +0000 (07:54 +0000)
src/Cockpit/panel.cxx

index 16d7b77923462b1094cee530ff13ed4d76098919..871ca97f3971d2f0fa9720cb0a754a9d71119eba 100644 (file)
 // my hardware/driver requires many more.
 #define POFF_UNITS 4
 
-#ifndef HAVE_TRUNCF
-inline float truncf (float d) {
-    return (d < 0) ? -floorf(-d) : floorf(d);
-}
-#endif
-
-\f
 ////////////////////////////////////////////////////////////////////////
 // Local functions.
 ////////////////////////////////////////////////////////////////////////
@@ -1125,7 +1118,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) ? -floorf(-d) : floorf(d);
       sprintf(_buf, _fmt.c_str(), d);
       break;
     }