Merge pull request 'addition of vectors' (#32) from Vec2Upgrade into master
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #32 Reviewed-by: Mat_02 <diletomatteo@gmail.com>
This commit is contained in:
commit
f21c036b1c
@ -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+")";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user