discord-jadx/app/src/main/java/androidx/constraintlayout/solver/widgets/Rectangle.java

48 lines
1.3 KiB
Java

package androidx.constraintlayout.solver.widgets;
public class Rectangle {
public int height;
public int width;
/* renamed from: x reason: collision with root package name */
public int f22x;
/* renamed from: y reason: collision with root package name */
public int f23y;
public boolean contains(int i, int i2) {
int i3;
int i4 = this.f22x;
return i >= i4 && i < i4 + this.width && i2 >= (i3 = this.f23y) && i2 < i3 + this.height;
}
public int getCenterX() {
return (this.f22x + this.width) / 2;
}
public int getCenterY() {
return (this.f23y + this.height) / 2;
}
public void grow(int i, int i2) {
this.f22x -= i;
this.f23y -= i2;
this.width = (i * 2) + this.width;
this.height = (i2 * 2) + this.height;
}
public boolean intersects(Rectangle rectangle) {
int i;
int i2;
int i3 = this.f22x;
int i4 = rectangle.f22x;
return i3 >= i4 && i3 < i4 + rectangle.width && (i = this.f23y) >= (i2 = rectangle.f23y) && i < i2 + rectangle.height;
}
public void setBounds(int i, int i2, int i3, int i4) {
this.f22x = i;
this.f23y = i2;
this.width = i3;
this.height = i4;
}
}