From 7b35c77062b00a0e4b379493ac4a364521f64cf0 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 27 Mar 2012 08:44:08 -0700 Subject: Add a missing round() for MSVC --- utils/makehrtf.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'utils/makehrtf.c') diff --git a/utils/makehrtf.c b/utils/makehrtf.c index a5debab7..9f0a5d95 100644 --- a/utils/makehrtf.c +++ b/utils/makehrtf.c @@ -19,6 +19,15 @@ #define M_PI 3.14159265358979323846 #endif +#ifdef _MSC_VER +static double round(double val) +{ + if(val < 0.0) + return ceil(val - 0.5); + return floor(val + 0.5); +} +#endif + // The sample rate of the MIT HRIR data sets. #define MIT_IR_RATE (44100) -- cgit v1.2.3