|
@@ -207,11 +207,6 @@ struct Rect2 {
|
|
bool operator!=(const Rect2 &p_rect) const { return position != p_rect.position || size != p_rect.size; }
|
|
bool operator!=(const Rect2 &p_rect) const { return position != p_rect.position || size != p_rect.size; }
|
|
|
|
|
|
inline Rect2 grow(real_t p_amount) const {
|
|
inline Rect2 grow(real_t p_amount) const {
|
|
-#ifdef MATH_CHECKS
|
|
|
|
- if (unlikely(size.x < 0 || size.y < 0)) {
|
|
|
|
- ERR_PRINT("Rect2 size is negative, this is not supported. Use Rect2.abs() to get a Rect2 with a positive size.");
|
|
|
|
- }
|
|
|
|
-#endif
|
|
|
|
Rect2 g = *this;
|
|
Rect2 g = *this;
|
|
g.grow_by(p_amount);
|
|
g.grow_by(p_amount);
|
|
return g;
|
|
return g;
|
|
@@ -238,11 +233,6 @@ struct Rect2 {
|
|
}
|
|
}
|
|
|
|
|
|
inline Rect2 grow_individual(real_t p_left, real_t p_top, real_t p_right, real_t p_bottom) const {
|
|
inline Rect2 grow_individual(real_t p_left, real_t p_top, real_t p_right, real_t p_bottom) const {
|
|
-#ifdef MATH_CHECKS
|
|
|
|
- if (unlikely(size.x < 0 || size.y < 0)) {
|
|
|
|
- ERR_PRINT("Rect2 size is negative, this is not supported. Use Rect2.abs() to get a Rect2 with a positive size.");
|
|
|
|
- }
|
|
|
|
-#endif
|
|
|
|
Rect2 g = *this;
|
|
Rect2 g = *this;
|
|
g.position.x -= p_left;
|
|
g.position.x -= p_left;
|
|
g.position.y -= p_top;
|
|
g.position.y -= p_top;
|
|
@@ -488,11 +478,6 @@ struct Rect2i {
|
|
bool operator!=(const Rect2i &p_rect) const { return position != p_rect.position || size != p_rect.size; }
|
|
bool operator!=(const Rect2i &p_rect) const { return position != p_rect.position || size != p_rect.size; }
|
|
|
|
|
|
Rect2i grow(int p_amount) const {
|
|
Rect2i grow(int p_amount) const {
|
|
-#ifdef MATH_CHECKS
|
|
|
|
- if (unlikely(size.x < 0 || size.y < 0)) {
|
|
|
|
- ERR_PRINT("Rect2i size is negative, this is not supported. Use Rect2i.abs() to get a Rect2i with a positive size.");
|
|
|
|
- }
|
|
|
|
-#endif
|
|
|
|
Rect2i g = *this;
|
|
Rect2i g = *this;
|
|
g.position.x -= p_amount;
|
|
g.position.x -= p_amount;
|
|
g.position.y -= p_amount;
|
|
g.position.y -= p_amount;
|
|
@@ -515,11 +500,6 @@ struct Rect2i {
|
|
}
|
|
}
|
|
|
|
|
|
inline Rect2i grow_individual(int p_left, int p_top, int p_right, int p_bottom) const {
|
|
inline Rect2i grow_individual(int p_left, int p_top, int p_right, int p_bottom) const {
|
|
-#ifdef MATH_CHECKS
|
|
|
|
- if (unlikely(size.x < 0 || size.y < 0)) {
|
|
|
|
- ERR_PRINT("Rect2i size is negative, this is not supported. Use Rect2i.abs() to get a Rect2i with a positive size.");
|
|
|
|
- }
|
|
|
|
-#endif
|
|
|
|
Rect2i g = *this;
|
|
Rect2i g = *this;
|
|
g.position.x -= p_left;
|
|
g.position.x -= p_left;
|
|
g.position.y -= p_top;
|
|
g.position.y -= p_top;
|