add: own branch

This commit is contained in:
ramollia
2025-09-16 11:23:48 +02:00
committed by lieght
parent 82fd67d351
commit 5fcb77fd92
26 changed files with 773 additions and 177 deletions

View File

@@ -0,0 +1,30 @@
package org.toop.math;
public class Bounds {
private int x;
private int y;
private int width;
private int height;
public Bounds(int x, int y, int width, int height) {
set(x, y, width, height);
}
public void set(int x, int y, int width, int height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
public int getX() { return x; }
public int getY() { return y; }
public int getWidth() { return width; }
public int getHeight() { return height; }
public boolean check(int x, int y) {
return
x >= this.x && x <= this.x + this.width &&
y >= this.y && y <= this.y + this.height;
}
}