adding sub to vec2 #39

Closed
tonitch wants to merge 1 commits from vec2sub into master

View File

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