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.
This commit is contained in:
@@ -16,7 +16,6 @@ namespace godot {
|
||||
#endif
|
||||
|
||||
real_t Rect2::distance_to(const Vector2 &p_point) const {
|
||||
|
||||
real_t dist = 1e20;
|
||||
|
||||
if (p_point.x < position.x) {
|
||||
@@ -77,7 +76,6 @@ Rect2::operator String() const {
|
||||
}
|
||||
|
||||
bool Rect2::intersects_segment(const Point2 &p_from, const Point2 &p_to, Point2 *r_position, Point2 *r_normal) const {
|
||||
|
||||
real_t min = 0, max = 1;
|
||||
int axis = 0;
|
||||
real_t sign = 0;
|
||||
@@ -91,7 +89,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;
|
||||
@@ -100,7 +97,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;
|
||||
@@ -135,7 +131,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] = {
|
||||
|
||||
Reference in New Issue
Block a user