From cd1358361917eb52ae1bef8bfe210d7b021f029e Mon Sep 17 00:00:00 2001 From: Max-Wilhelm Bruker Date: Wed, 9 Sep 2009 12:47:34 +0200 Subject: [PATCH] fixed arithmetic error --- cockatrice/src/tablezone.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/tablezone.cpp b/cockatrice/src/tablezone.cpp index f2053af0..f56d16f9 100644 --- a/cockatrice/src/tablezone.cpp +++ b/cockatrice/src/tablezone.cpp @@ -179,12 +179,12 @@ QPoint TableZone::mapToGrid(const QPointF &mapPoint) const qDebug("UNTER grenze"); if (economicGrid) return QPoint( - x * 2 / CARD_WIDTH - (x / (2 * CARD_WIDTH)), + x * 2 / CARD_WIDTH - floor(x / (2 * CARD_WIDTH)), 3 ); else { return QPoint( - round((double) x / (1.5 * CARD_WIDTH)), + x / (1.5 * CARD_WIDTH), 3 ); }