From a0b0753c5e4f6e206c24d6845e646934ec98ceb4 Mon Sep 17 00:00:00 2001 From: BlueNutterfly Date: Sun, 11 Nov 2018 20:41:01 +0400 Subject: [PATCH] Remove redundant .nor() in nearestPoint() --- core/src/com/me/brickbuster/Utils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/me/brickbuster/Utils.java b/core/src/com/me/brickbuster/Utils.java index 6dff173..1eab09a 100644 --- a/core/src/com/me/brickbuster/Utils.java +++ b/core/src/com/me/brickbuster/Utils.java @@ -14,7 +14,7 @@ public class Utils { float lineLen = lineDir.len(); lineDir.nor(); Vector2 ballDir = p1.sub(linep1); - return linep1.add(lineDir.nor().scl(MathUtils.clamp(ballDir.dot(lineDir), 0, lineLen))); + return linep1.add(lineDir.scl(MathUtils.clamp(ballDir.dot(lineDir), 0, lineLen))); } }