mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
For MSVC builds, implement 'rint()' and 'rintf()' to supplement the ones that were already implemented
This commit is contained in:
parent
4e36760bac
commit
8b5474b9e1
4 changed files with 24 additions and 13 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue