mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Core: Move Rect2i to its own rect2i.h header
And take the opportunity to improve interdependencies a bit with forward declares where possible.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user