addition of vectors
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

Vector to string
This commit is contained in:
Debucquoy 2023-04-27 10:35:36 +02:00
parent 9711be3665
commit f71675dd21
Signed by: tonitch
GPG Key ID: A78D6421F083D42E

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