mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 12:12:28 +00:00
Make Rect2.encloses return true on same size
This commit is contained in:
parent
bf1c81adf4
commit
a681c90009
@ -99,8 +99,8 @@ struct Rect2 {
|
||||
inline bool encloses(const Rect2 &p_rect) const {
|
||||
|
||||
return (p_rect.position.x >= position.x) && (p_rect.position.y >= position.y) &&
|
||||
((p_rect.position.x + p_rect.size.x) < (position.x + size.x)) &&
|
||||
((p_rect.position.y + p_rect.size.y) < (position.y + size.y));
|
||||
((p_rect.position.x + p_rect.size.x) <= (position.x + size.x)) &&
|
||||
((p_rect.position.y + p_rect.size.y) <= (position.y + size.y));
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ bool has_no_area() const {
|
||||
|
Loading…
Reference in New Issue
Block a user