From 144a3ddfb55fbf17cec4baaa73542664d68a3b05 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sat, 31 Dec 2022 11:47:56 +0100 Subject: Debug comments$ --- src/Types.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Types.cpp') 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+width) || Y(y+height)) + return false; + return true; } Property operator|(Property lhs, Property rhs) { -- cgit v1.2.3