diff options
author | John Emmas <johne53@tiscali.co.uk> | 2016-08-19 10:19:32 +0100 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2016-08-19 14:11:00 +0100 |
commit | a0b117b9481a1a3091a6d0c1fe0deacf17e20529 (patch) | |
tree | aa123cd77e41c0198a148047ef5cfaba01a8ef30 /libs/pbd/msvc | |
parent | 5cc97f55f20d7f98cfa6d927507235dad84bfdf3 (diff) |
'roundf()' wasn't introduced in MSVC until VS2013 - so for the time being, let's emulate it using 'floorf()'
Diffstat (limited to 'libs/pbd/msvc')
-rw-r--r-- | libs/pbd/msvc/msvc_pbd.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/pbd/msvc/msvc_pbd.cc b/libs/pbd/msvc/msvc_pbd.cc index f49ac5393c..68596e3463 100644 --- a/libs/pbd/msvc/msvc_pbd.cc +++ b/libs/pbd/msvc/msvc_pbd.cc @@ -225,6 +225,24 @@ ssize_t ret; //*************************************************************** // +// roundf() +// +// Emulates roundf() using floorf(). +// +// Returns: +// +// On Success: The largest integer that is less than or +// equal to 'x'. +// On Failure: None +// +LIBPBD_API float PBD_APICALLTYPE +roundf(float x) +{ + return (floorf(x)); +} + +//*************************************************************** +// // round() // // Emulates round() using floor(). |