fixed some checkstyle issues

This commit is contained in:
hneemann 2016-05-10 12:28:28 +02:00
parent 154ddc4a2c
commit 641e0e0c4c

View File

@ -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<Vector> add(List<Vector> vectors, Vector offs) {
ArrayList<Vector> 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<Vector> add(List<Vector> vectors, Vector offs) {
ArrayList<Vector> newVec = new ArrayList<>();
for (Vector v : vectors)
newVec.add(v.add(offs));
return newVec;
}
}