X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=msvc_extra_headers%2Fardourext%2Ffloat_cast.h.input;h=94433da9657a1c39d40709eacf8c5c58e1f00027;hb=aefa63aaa6080da53381fd3f03d3afab2cfeed45;hp=a5a82e3668cccf67764548b1d802714820017a97;hpb=6a436fd826d1c9d88b60287696cc0836ccce35aa;p=ardour.git diff --git a/msvc_extra_headers/ardourext/float_cast.h.input b/msvc_extra_headers/ardourext/float_cast.h.input index a5a82e3668..94433da965 100644 --- a/msvc_extra_headers/ardourext/float_cast.h.input +++ b/msvc_extra_headers/ardourext/float_cast.h.input @@ -56,6 +56,18 @@ 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; @@ -68,6 +80,41 @@ 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; + + _asm + { fld flt + fistp intgr + } ; + + return intgr ; + } + + __inline long long int + llrintf (float flt) + { long long int intgr; + + _asm + { fld flt + fistp intgr + } ; + + return intgr ; + } #endif #endif // __FLOAT_CAST_H__