diff --git a/app/src/main/java/school_project/Vec2.java b/app/src/main/java/school_project/Vec2.java index 7bf6ed9..6529e15 100644 --- a/app/src/main/java/school_project/Vec2.java +++ b/app/src/main/java/school_project/Vec2.java @@ -26,4 +26,13 @@ public class Vec2 implements Serializable { } return false; } + + public Vec2 add(Vec2 o){ + return new Vec2(x + o.x, y + o.y); + } + + @Override + public String toString() { + return "("+x+","+y+")"; + } }