fixed arithmetic error

This commit is contained in:
Max-Wilhelm Bruker 2009-09-09 12:47:34 +02:00
parent 00a2f49c94
commit cd13583619

View file

@ -179,12 +179,12 @@ QPoint TableZone::mapToGrid(const QPointF &mapPoint) const
qDebug("UNTER grenze"); qDebug("UNTER grenze");
if (economicGrid) if (economicGrid)
return QPoint( return QPoint(
x * 2 / CARD_WIDTH - (x / (2 * CARD_WIDTH)), x * 2 / CARD_WIDTH - floor(x / (2 * CARD_WIDTH)),
3 3
); );
else { else {
return QPoint( return QPoint(
round((double) x / (1.5 * CARD_WIDTH)), x / (1.5 * CARD_WIDTH),
3 3
); );
} }