Skip to content

Commit 57494d0

Browse files
authored
Revert math.floor unneeded changes
the math.floor does not solve the problem of zooming into one point Modified line 28 "com.translate((int)Math.floor((xDifference * getZoomValue())), (int)Math.floor(yDifference * getZoomValue()));"
1 parent 260cbab commit 57494d0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/actions/ZoomAction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ public void performAction() {
2525
for ( PaintComponent com: panel.getPaintComponents() ) {
2626
int xDifference = com.getX() - centerX;
2727
int yDifference = com.getY() - centerY;
28-
29-
com.translate((int)Math.floor((xDifference * getZoomValue())), (int)Math.floor(yDifference * getZoomValue()));
28+
com.translate((int)(xDifference * getZoomValue()), (int)(yDifference * getZoomValue()));
3029
}
3130
panel.repaint();
3231
}

0 commit comments

Comments
 (0)