summaryrefslogtreecommitdiffstats
path: root/core/math/rect2.h
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-08-14 21:51:45 -0500
committerAaron Franke <arnfranke@yahoo.com>2022-09-04 23:03:36 -0500
commit995b9f94e8378b3e1dd81068925e9d34c68445c6 (patch)
tree673315b285de37ae0d1e361614a5e59641abd9ae /core/math/rect2.h
parent817ae9566723fd28be9dc5bb199001dc50ca6b54 (diff)
downloadredot-engine-995b9f94e8378b3e1dd81068925e9d34c68445c6.tar.gz
Replace Rect2(i) has_no_area with has_area
Diffstat (limited to 'core/math/rect2.h')
-rw-r--r--core/math/rect2.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/rect2.h b/core/math/rect2.h
index 679af933c2..2d1be3d4f3 100644
--- a/core/math/rect2.h
+++ b/core/math/rect2.h
@@ -140,8 +140,8 @@ struct _NO_DISCARD_ Rect2 {
((p_rect.position.y + p_rect.size.y) <= (position.y + size.y));
}
- _FORCE_INLINE_ bool has_no_area() const {
- return (size.x <= 0 || size.y <= 0);
+ _FORCE_INLINE_ bool has_area() const {
+ return size.x > 0.0f && size.y > 0.0f;
}
// Returns the instersection between two Rect2s or an empty Rect2 if there is no intersection