adding sub to vec2
This commit is contained in:
parent
53972cd1ef
commit
5abb34da2e
@ -31,6 +31,10 @@ public class Vec2 implements Serializable {
|
||||
return new Vec2(x + o.x, y + o.y);
|
||||
}
|
||||
|
||||
public Vec2 sub(Vec2 o){
|
||||
return new Vec2(x - o.x, y - o.y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "("+x+","+y+")";
|
||||
|
Loading…
x
Reference in New Issue
Block a user