2021-07-24 02:37:17 +00:00
|
|
|
package androidx.constraintlayout.solver.widgets;
|
2022-03-07 09:34:54 +00:00
|
|
|
/* loaded from: classes.dex */
|
2021-07-24 02:37:17 +00:00
|
|
|
public class Rectangle {
|
|
|
|
public int height;
|
|
|
|
public int width;
|
|
|
|
|
|
|
|
/* renamed from: x reason: collision with root package name */
|
2021-12-17 21:59:34 +00:00
|
|
|
public int f31x;
|
2021-07-24 02:37:17 +00:00
|
|
|
|
|
|
|
/* renamed from: y reason: collision with root package name */
|
2021-12-17 21:59:34 +00:00
|
|
|
public int f32y;
|
2021-07-24 02:37:17 +00:00
|
|
|
|
|
|
|
public boolean contains(int i, int i2) {
|
|
|
|
int i3;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i4 = this.f31x;
|
|
|
|
return i >= i4 && i < i4 + this.width && i2 >= (i3 = this.f32y) && i2 < i3 + this.height;
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public int getCenterX() {
|
2021-12-17 21:59:34 +00:00
|
|
|
return (this.f31x + this.width) / 2;
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public int getCenterY() {
|
2021-12-17 21:59:34 +00:00
|
|
|
return (this.f32y + this.height) / 2;
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void grow(int i, int i2) {
|
2021-12-17 21:59:34 +00:00
|
|
|
this.f31x -= i;
|
|
|
|
this.f32y -= 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-12-17 21:59:34 +00:00
|
|
|
int i3 = this.f31x;
|
|
|
|
int i4 = rectangle.f31x;
|
|
|
|
return i3 >= i4 && i3 < i4 + rectangle.width && (i = this.f32y) >= (i2 = rectangle.f32y) && i < i2 + rectangle.height;
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void setBounds(int i, int i2, int i3, int i4) {
|
2021-12-17 21:59:34 +00:00
|
|
|
this.f31x = i;
|
|
|
|
this.f32y = i2;
|
2021-07-24 02:37:17 +00:00
|
|
|
this.width = i3;
|
|
|
|
this.height = i4;
|
|
|
|
}
|
|
|
|
}
|