mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-16 16:34:47 -04:00
fixed some checkstyle issues
This commit is contained in:
parent
154ddc4a2c
commit
641e0e0c4c
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user