added non-scalar and vec2f versions of div to vec2i

This commit is contained in:
DaniTheSkunk 2022-09-16 03:10:00 +02:00
parent 7ace9c3409
commit 7c3ee28ba5
1 changed files with 15 additions and 0 deletions

View File

@ -50,4 +50,19 @@ public final class Vec2i {
public static Vec2i div(Vec2i a, int b) {
return new Vec2i(a.x / b, a.y / b);
}
public static Vec2i div(Vec2i a, Vec2i b) {
return new Vec2i(a.x / b.x, a.y / b.y);
}
public static Vec2f divf(Vec2i a, double b) {
return new Vec2f(a.x / b, a.y / b);
}
public static Vec2f divf(Vec2i a, Vec2f b) {
return new Vec2f(a.x / b.x, a.y / b.y);
}
public static Vec2f divf(Vec2i a, int b) {
return new Vec2f(a.x / (double)b, a.y / (double)b);
}
public static Vec2f divf(Vec2i a, Vec2i b) {
return new Vec2f(a.x / (double)b.x, a.y / (double)b.y);
}
}