For MSVC builds, implement 'rint()' and 'rintf()' to supplement the ones that were...
[ardour.git] / msvc_extra_headers / ardourext / float_cast.h.input
index 2ba3bbbe62f2d0547d3b75d705bc20eee63c3cbe..94433da9657a1c39d40709eacf8c5c58e1f00027 100644 (file)
                return intgr ;
        }
 
+       __inline double
+       rint (double flt)
+       {       long long int intgr;
+
+               _asm
+               {       fld flt
+                       fistp intgr
+                       } ;
+
+               return (double) intgr ;
+       }
+
        __inline long int
        lrintf (float flt)
        {       int intgr;
                return intgr ;
        }
 
+       __inline float
+       rintf (float flt)
+       {       int intgr;
+
+               _asm
+               {       fld flt
+                       fistp intgr
+                       } ;
+
+               return (float) intgr ;
+       }
+
        __inline long long int 
        llrint (double flt)
        {       long long int intgr;