2021-07-24 02:37:17 +00:00
|
|
|
package androidx.constraintlayout.solver.widgets;
|
|
|
|
public class Rectangle {
|
|
|
|
public int height;
|
|
|
|
public int width;
|
|
|
|
|
|
|
|
/* renamed from: x reason: collision with root package name */
|
2021-11-02 06:38:17 +00:00
|
|
|
public int f24x;
|
2021-07-24 02:37:17 +00:00
|
|
|
|
|
|
|
/* renamed from: y reason: collision with root package name */
|
2021-11-02 06:38:17 +00:00
|
|
|
public int f25y;
|
2021-07-24 02:37:17 +00:00
|
|
|
|
|
|
|
public boolean contains(int i, int i2) {
|
|
|
|
int i3;
|
2021-11-02 06:38:17 +00:00
|
|
|
int i4 = this.f24x;
|
|
|
|
return i >= i4 && i < i4 + this.width && i2 >= (i3 = this.f25y) && i2 < i3 + this.height;
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public int getCenterX() {
|
2021-11-02 06:38:17 +00:00
|
|
|
return (this.f24x + this.width) / 2;
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public int getCenterY() {
|
2021-11-02 06:38:17 +00:00
|
|
|
return (this.f25y + this.height) / 2;
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void grow(int i, int i2) {
|
2021-11-02 06:38:17 +00:00
|
|
|
this.f24x -= i;
|
|
|
|
this.f25y -= i2;
|
2021-07-24 02:37:17 +00:00
|
|
|
this.width = (i * 2) + this.width;
|
|
|
|
this.height = (i2 * 2) + this.height;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean intersects(Rectangle rectangle) {
|
|
|
|
int i;
|
|
|
|
int i2;
|
2021-11-02 06:38:17 +00:00
|
|
|
int i3 = this.f24x;
|
|
|
|
int i4 = rectangle.f24x;
|
|
|
|
return i3 >= i4 && i3 < i4 + rectangle.width && (i = this.f25y) >= (i2 = rectangle.f25y) && i < i2 + rectangle.height;
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void setBounds(int i, int i2, int i3, int i4) {
|
2021-11-02 06:38:17 +00:00
|
|
|
this.f24x = i;
|
|
|
|
this.f25y = i2;
|
2021-07-24 02:37:17 +00:00
|
|
|
this.width = i3;
|
|
|
|
this.height = i4;
|
|
|
|
}
|
|
|
|
}
|