From bec7c9a1615b0178e7b0321cb5c6ff26ea4c67ed Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 6 Mar 2018 16:06:35 +0100 Subject: [PATCH] Don't truncate to int in wxRealPoint::operator*() wxRealPoint uses double coordinates and it makes no sense to truncate the result of scaling it to int -- this was almost certainly a copy-and-paste error due to copying the code of the corresponding wxPoint method. --- include/wx/gdicmn.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 10baa55178..d366d4e664 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -547,12 +547,12 @@ inline wxRealPoint operator*(unsigned long i, const wxRealPoint& s) inline wxRealPoint operator*(const wxRealPoint& s, double i) { - return wxRealPoint(int(s.x * i), int(s.y * i)); + return wxRealPoint(s.x * i, s.y * i); } inline wxRealPoint operator*(double i, const wxRealPoint& s) { - return wxRealPoint(int(s.x * i), int(s.y * i)); + return wxRealPoint(s.x * i, s.y * i); }