aboutsummaryrefslogtreecommitdiff
path: root/src/Types.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-12-31 11:47:56 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-12-31 11:47:56 +0100
commit144a3ddfb55fbf17cec4baaa73542664d68a3b05 (patch)
tree43add38a2cd05d52349a6561bd4d9ed8df94f862 /src/Types.cpp
parent2bb6730df8094c89af5a07d394fc02c43aea24eb (diff)
Debug comments$
Diffstat (limited to 'src/Types.cpp')
-rw-r--r--src/Types.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Types.cpp b/src/Types.cpp
index 76bf398..accc99c 100644
--- a/src/Types.cpp
+++ b/src/Types.cpp
@@ -3,10 +3,10 @@
namespace cgeditor {
bool Element::IsOver(const double &X, const double &Y) const {
- if (width < 0) {
- return (x >= x && Y >= y && Y <= (y + height));
- }
- return ((X >= x && X <= (x + width) && Y >= y && Y <= (y + height)));
+ // Check if no overlap
+ if(X<x|| X>(x+width) || Y<y || Y>(y+height))
+ return false;
+ return true;
}
Property operator|(Property lhs, Property rhs) {