added 3 and 4 op vec2i add

This commit is contained in:
DaniTheSkunk 2022-09-15 22:53:37 +02:00
parent bdc7864e0c
commit ba42f2d3bf
1 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,14 @@ public final class Vec2i {
return new Vec2i(a.x + b.x, a.y + b.y); return new Vec2i(a.x + b.x, a.y + b.y);
} }
public static Vec2i add(Vec2i a, Vec2i b, Vec2i c) {
return new Vec2i(a.x + b.x + c.x, a.y + b.y + c.y);
}
public static Vec2i add(Vec2i a, Vec2i b, Vec2i c, Vec2i d) {
return new Vec2i(a.x + b.x + c.x + d.x, a.y + b.y + c.y + d.y);
}
public static Vec2i sub(Vec2i a, Vec2i b) { public static Vec2i sub(Vec2i a, Vec2i b) {
return new Vec2i(a.x - b.x, a.y - b.y); return new Vec2i(a.x - b.x, a.y - b.y);
} }