From 7ca3cc6fc375515bcb0bb925c944df067d3b2ead Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 19 Jan 2010 22:02:59 +0000 Subject: [PATCH] Fix wxMulDivInt32() to round the result like win32 MulDiv() does. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/math.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/wx/math.h b/include/wx/math.h index a17bb9d092..33831c274d 100644 --- a/include/wx/math.h +++ b/include/wx/math.h @@ -128,10 +128,8 @@ #if defined(__WXMSW__) && !defined(__WXWINCE__) #define wxMulDivInt32( a , b , c ) ::MulDiv( a , b , c ) -#elif defined( __WXMAC__ ) - #define wxMulDivInt32( a , b , c ) ( (wxInt32) ( ( (wxInt64)(a) * (wxInt64)(b) ) / (wxInt64)(c) ) ) #else - #define wxMulDivInt32( a , b , c ) ((wxInt32)((a)*(((wxDouble)b)/((wxDouble)c)))) + #define wxMulDivInt32( a , b , c ) (wxRound((a)*(((wxDouble)b)/((wxDouble)c)))) #endif #if wxUSE_APPLE_IEEE -- 2.50.0