updated redrect
This commit is contained in:
parent
7af51f992a
commit
e48e4e1797
@ -18,7 +18,7 @@ public class RedRectangle2D {
|
||||
|
||||
@JsonIgnore
|
||||
public boolean isEmpty() {
|
||||
return (width <= 0.0f) || (height <= 0.0f);
|
||||
return width <= 0.0f || height <= 0.0f;
|
||||
}
|
||||
|
||||
public boolean contains(double x, double y, double w, double h) {
|
||||
@ -27,9 +27,9 @@ public class RedRectangle2D {
|
||||
}
|
||||
double x0 = getX();
|
||||
double y0 = getY();
|
||||
return (x >= x0 &&
|
||||
return x >= x0 &&
|
||||
y >= y0 &&
|
||||
(x + w) <= x0 + getWidth() &&
|
||||
(y + h) <= y0 + getHeight());
|
||||
(y + h) <= y0 + getHeight();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user