added Recti
This commit is contained in:
parent
94245e7689
commit
89d9735203
|
@ -0,0 +1,39 @@
|
|||
package com.danitheskunk.skunkworks;
|
||||
|
||||
public final class Recti {
|
||||
final Vec2i pos, size;
|
||||
|
||||
//constructors
|
||||
public Recti(int x, int y, int width, int height) {
|
||||
this(new Vec2i(x, y), new Vec2i(width, height));
|
||||
}
|
||||
|
||||
public Recti(Vec2i pos, Vec2i size) {
|
||||
this.pos = pos; this.size = size;
|
||||
}
|
||||
|
||||
//getters
|
||||
public Vec2i getPos() {
|
||||
return pos;
|
||||
}
|
||||
|
||||
public Vec2i getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
return pos.getX();
|
||||
}
|
||||
|
||||
public int getY() {
|
||||
return pos.getY();
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return size.getX();
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return size.getY();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue