mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 09:12:09 +10:00
fixed rounding to grid
This commit is contained in:
+1
-1
@@ -664,7 +664,7 @@ public class Presenter implements IPlugInPort {
|
|||||||
*/
|
*/
|
||||||
private int roundToGrid(int x) {
|
private int roundToGrid(int x) {
|
||||||
int grid = currentProject.getGridSpacing().convertToPixels();
|
int grid = currentProject.getGridSpacing().convertToPixels();
|
||||||
return (Math.round(x / grid) * grid);
|
return (Math.round(1f * x / grid) * grid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user