Skip to content

Commit 398ff3a

Browse files
committed
Simplify implementation of Camera.ScalePointWithZoom
1 parent 04af0b1 commit 398ff3a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/TSMapEditor/Rendering/Camera.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public double ZoomLevel
8484

8585
public int ScaleIntWithZoom(int value) => (int)(value * ZoomLevel);
8686

87-
public Point2D ScalePointWithZoom(Point2D value) => new Point2D((int)(value.X * ZoomLevel), (int)(value.Y * ZoomLevel));
87+
public Point2D ScalePointWithZoom(Point2D value) => value.ScaleBy(ZoomLevel);
8888

8989
public void CenterOnCell(Point2D cellCoords)
9090
{

0 commit comments

Comments
 (0)