From 4f9f6e01959fe803f3b1830bb47803615276a9cf Mon Sep 17 00:00:00 2001 From: punchready Date: Mon, 19 Jul 2021 15:27:48 +0200 Subject: [PATCH] fix: make vector scaling round --- .../java/uulm/teamname/marvelous/gamelibrary/IntVector2.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/IntVector2.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/IntVector2.java index 801e45a..f5051bf 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/IntVector2.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/IntVector2.java @@ -111,7 +111,7 @@ public class IntVector2 implements Serializable { } public IntVector2 scale(float x, float y) { - return new IntVector2((int)(this.x * x), (int)(this.y * y)); + return new IntVector2(Math.round(this.x * x), Math.round(this.y * y)); } public IntVector2 scale(float scalar) {