diff options
author | Alexander Holland <alexander.holland@live.de> | 2019-10-02 03:27:48 +0200 |
---|---|---|
committer | Alexander Holland <alexander.holland@live.de> | 2019-10-02 03:27:48 +0200 |
commit | a681c90009a7314153ef9102a334b16b3b4ec1ef (patch) | |
tree | 3bcb5d2bded4e0f2bff0f2acf73193e66580dce2 /core | |
parent | bf1c81adf4b1584470318d25fa2ef67e261874cf (diff) |
Make Rect2.encloses return true on same size
Diffstat (limited to 'core')
-rw-r--r-- | core/math/rect2.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/rect2.h b/core/math/rect2.h index d636aa223f..f58756ee40 100644 --- a/core/math/rect2.h +++ b/core/math/rect2.h @@ -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 { |