mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
Fix for floating point conversion
This commit is contained in:
parent
ecc6f7b20f
commit
84f06503c6
2 changed files with 2 additions and 2 deletions
|
|
@ -133,7 +133,7 @@ QPoint TableZone::mapToGrid(const QPointF &mapPoint) const
|
|||
else if (y > height - CARD_HEIGHT)
|
||||
y = height - CARD_HEIGHT;
|
||||
|
||||
return QPoint(round(((double) x * gridPointsPerCardX) / CARD_WIDTH), round(((double) y * gridPointsPerCardY) / CARD_HEIGHT));
|
||||
return QPoint((int) round(((double) x * gridPointsPerCardX) / CARD_WIDTH), (int) round(((double) y * gridPointsPerCardY) / CARD_HEIGHT));
|
||||
}
|
||||
|
||||
QPoint TableZone::getFreeGridPoint(int row) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue