diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 13:23:58 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 16:54:55 +0200 |
commit | 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch) | |
tree | a27e497da7104dd0a64f98a04fa3067668735e91 /core/math/rect2.cpp | |
parent | 710b34b70227becdc652b4ae027fe0ac47409642 (diff) |
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.
This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.
There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).
Part of #33027.
Diffstat (limited to 'core/math/rect2.cpp')
-rw-r--r-- | core/math/rect2.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/core/math/rect2.cpp b/core/math/rect2.cpp index 12b9904c88..1e26f815ed 100644 --- a/core/math/rect2.cpp +++ b/core/math/rect2.cpp @@ -31,12 +31,10 @@ #include "core/math/transform_2d.h" // Includes rect2.h but Rect2 needs Transform2D 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); } bool Rect2::intersects_segment(const Point2 &p_from, const Point2 &p_to, Point2 *r_pos, Point2 *r_normal) const { - real_t min = 0, max = 1; int axis = 0; real_t sign = 0; @@ -50,7 +48,6 @@ bool Rect2::intersects_segment(const Point2 &p_from, const Point2 &p_to, Point2 real_t csign; if (seg_from < seg_to) { - if (seg_from > box_end || seg_to < box_begin) return false; real_t length = seg_to - seg_from; @@ -59,7 +56,6 @@ bool Rect2::intersects_segment(const Point2 &p_from, const Point2 &p_to, Point2 csign = -1.0; } else { - if (seg_to > box_end || seg_from < box_begin) return false; real_t length = seg_to - seg_from; @@ -94,7 +90,6 @@ bool Rect2::intersects_segment(const Point2 &p_from, const Point2 &p_to, Point2 } bool Rect2::intersects_transformed(const Transform2D &p_xform, const Rect2 &p_rect) const { - //SAT intersection between local and transformed rect2 Vector2 xf_points[4] = { |