addition of vectors #32

Merged
tonitch merged 1 commits from Vec2Upgrade into master 2023-05-01 17:53:05 +02:00

View File

@ -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+")";
}
}