fixed arithmetic error
This commit is contained in:
parent
00a2f49c94
commit
cd13583619
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue