non-scalar multiply in vec2i

This commit is contained in:
DaniTheSkunk 2022-09-16 03:00:20 +02:00
parent 4ab459d515
commit 7ace9c3409
1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,9 @@ public final class Vec2i {
public static Vec2i mul(Vec2i a, int b) { public static Vec2i mul(Vec2i a, int b) {
return new Vec2i(a.x * b, a.y * b); return new Vec2i(a.x * b, a.y * b);
} }
public static Vec2i mul(Vec2i a, Vec2i b) {
return new Vec2i(a.x * b.x, a.y * b.y);
}
public static Vec2i div(Vec2i a, int b) { public static Vec2i div(Vec2i a, int b) {
return new Vec2i(a.x / b, a.y / b); return new Vec2i(a.x / b, a.y / b);