Recti can return corner Vec2i now
This commit is contained in:
parent
fd46e3196c
commit
a5c48c2ef2
|
@ -36,4 +36,20 @@ public final class Recti {
|
|||
public int getHeight() {
|
||||
return size.getY();
|
||||
}
|
||||
|
||||
public Vec2i getTopLeft() {
|
||||
return pos;
|
||||
}
|
||||
|
||||
public Vec2i getTopRight() {
|
||||
return new Vec2i(pos.getX() + size.getX(), pos.getY());
|
||||
}
|
||||
|
||||
public Vec2i getBottomLeft() {
|
||||
return new Vec2i(pos.getX(), pos.getY() + size.getY());
|
||||
}
|
||||
|
||||
public Vec2i getBottomRight() {
|
||||
return Vec2i.add(pos, size);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue