From 641e0e0c4c0f04689a01376b765feea0262caec6 Mon Sep 17 00:00:00 2001 From: hneemann Date: Tue, 10 May 2016 12:28:28 +0200 Subject: [PATCH] fixed some checkstyle issues --- .../neemann/digital/draw/graphics/Vector.java | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/main/java/de/neemann/digital/draw/graphics/Vector.java b/src/main/java/de/neemann/digital/draw/graphics/Vector.java index 5b0547c47..923df72c5 100644 --- a/src/main/java/de/neemann/digital/draw/graphics/Vector.java +++ b/src/main/java/de/neemann/digital/draw/graphics/Vector.java @@ -112,6 +112,20 @@ public class Vector { return new Vector(this.x + x, this.y + y); } + /** + * Adds a offset to every vector in the given list + * + * @param vectors the original vectors + * @param offs the offset + * @return the new list + */ + public static List add(List vectors, Vector offs) { + ArrayList newVec = new ArrayList<>(); + for (Vector v : vectors) + newVec.add(v.add(offs)); + return newVec; + } + /** * Creates a new vector which has the value this-a * @@ -195,17 +209,4 @@ public class Vector { return new Vector(Math.round(x * 128 / l), Math.round(y * 128 / l)); } - /** - * Adds a offset to every vector in the given list - * - * @param vectors the original vectors - * @param offs the offset - * @return the new list - */ - public static List add(List vectors, Vector offs) { - ArrayList newVec = new ArrayList<>(); - for (Vector v : vectors) - newVec.add(v.add(offs)); - return newVec; - } }