mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-07 10:50:52 -08:00
fixed arithmetic error
This commit is contained in:
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user