diff options
Diffstat (limited to 'src/core/Rect2.cpp')
-rw-r--r-- | src/core/Rect2.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/core/Rect2.cpp b/src/core/Rect2.cpp index a041d30..b49d991 100644 --- a/src/core/Rect2.cpp +++ b/src/core/Rect2.cpp @@ -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] = { |