diff options
author | John Emmas <johne53@tiscali.co.uk> | 2015-04-24 19:11:10 +0100 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2015-04-24 19:11:10 +0100 |
commit | 8b5474b9e13fde1ec6632c32f65a39ecffc5d1d5 (patch) | |
tree | 4b6294c1166b941cb3e9430eda2efdf7df5f8802 /msvc_extra_headers/ardourext/float_cast.h.input | |
parent | 4e36760bacecb89f0bb48a90cce205671b316022 (diff) |
For MSVC builds, implement 'rint()' and 'rintf()' to supplement the ones that were already implemented
Diffstat (limited to 'msvc_extra_headers/ardourext/float_cast.h.input')
-rw-r--r-- | msvc_extra_headers/ardourext/float_cast.h.input | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/msvc_extra_headers/ardourext/float_cast.h.input b/msvc_extra_headers/ardourext/float_cast.h.input index 2ba3bbbe62..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,18 @@ 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; |