summaryrefslogtreecommitdiffstats
path: root/core/math/rect2.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-02-04 16:05:30 +0100
committerGitHub <noreply@github.com>2022-02-04 16:05:30 +0100
commit8495be9cece924b22a8148ce335d04836027bc40 (patch)
tree7808ce5fd0594fe76526a9192b497c418c36ce63 /core/math/rect2.cpp
parent721c32ee2bb15ca16692dee848fc3190ed0b6a49 (diff)
parent5f56d385b04f4054ec86605fcda56ffeed4ca5f4 (diff)
downloadredot-engine-8495be9cece924b22a8148ce335d04836027bc40.tar.gz
Merge pull request #57621 from akien-mga/core-split-rect2i-own-header
Diffstat (limited to 'core/math/rect2.cpp')
-rw-r--r--core/math/rect2.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/math/rect2.cpp b/core/math/rect2.cpp
index 9047c19434..d6e20bdc3c 100644
--- a/core/math/rect2.cpp
+++ b/core/math/rect2.cpp
@@ -28,7 +28,11 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "core/math/transform_2d.h" // Includes rect2.h but Rect2 needs Transform2D
+#include "rect2.h"
+
+#include "core/math/rect2i.h"
+#include "core/math/transform_2d.h"
+#include "core/string/ustring.h"
bool Rect2::is_equal_approx(const Rect2 &p_rect) const {
return position.is_equal_approx(p_rect.position) && size.is_equal_approx(p_rect.size);
@@ -278,6 +282,6 @@ Rect2::operator String() const {
return "[P: " + position.operator String() + ", S: " + size + "]";
}
-Rect2i::operator String() const {
- return "[P: " + position.operator String() + ", S: " + size + "]";
+Rect2::operator Rect2i() const {
+ return Rect2i(position, size);
}