summaryrefslogtreecommitdiffstats
path: root/include/core/Rect2.hpp
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2021-02-28 16:52:06 -0300
committerGeorge Marques <george@gmarqu.es>2021-02-28 16:57:34 -0300
commitcba90d630177ce6c57b5537e74ef3eab4e9c1ea2 (patch)
tree439897c2673d4f0af2635abffe73699d0cae6a01 /include/core/Rect2.hpp
parent77d41fa179e40560f1e264ed483638bf51713779 (diff)
downloadredot-cpp-cba90d630177ce6c57b5537e74ef3eab4e9c1ea2.tar.gz
Update clang-format to version 11
This is taken from the Godot repository, so formatting is similar. This updates the style rules as well. Also fix style in files to conform with this version.
Diffstat (limited to 'include/core/Rect2.hpp')
-rw-r--r--include/core/Rect2.hpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/include/core/Rect2.hpp b/include/core/Rect2.hpp
index 2843960..d9c1bc6 100644
--- a/include/core/Rect2.hpp
+++ b/include/core/Rect2.hpp
@@ -17,7 +17,6 @@ typedef Vector2 Point2;
struct Transform2D;
struct Rect2 {
-
Point2 position;
Size2 size;
@@ -48,14 +47,12 @@ struct Rect2 {
bool intersects_segment(const Point2 &p_from, const Point2 &p_to, Point2 *r_position = nullptr, Point2 *r_normal = nullptr) const;
inline bool encloses(const Rect2 &p_rect) const {
-
return (p_rect.position.x >= position.x) && (p_rect.position.y >= position.y) &&
((p_rect.position.x + p_rect.size.x) < (position.x + size.x)) &&
((p_rect.position.y + p_rect.size.y) < (position.y + size.y));
}
inline bool has_no_area() const {
-
return (size.x <= 0 || size.y <= 0);
}
Rect2 clip(const Rect2 &p_rect) const;
@@ -82,7 +79,6 @@ struct Rect2 {
inline bool operator!=(const Rect2 &p_rect) const { return position != p_rect.position || size != p_rect.size; }
inline Rect2 grow(real_t p_by) const {
-
Rect2 g = *this;
g.position.x -= p_by;
g.position.y -= p_by;
@@ -92,7 +88,6 @@ struct Rect2 {
}
inline Rect2 expand(const Vector2 &p_vector) const {
-
Rect2 r = *this;
r.expand_to(p_vector);
return r;