adding sub to vec2 #39

Closed
tonitch wants to merge 1 commits from vec2sub into master
Showing only changes of commit 5abb34da2e - Show all commits

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