summaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
Diffstat (limited to 'core/math')
-rw-r--r--core/math/math_2d.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/math_2d.h b/core/math/math_2d.h
index 02d921b67e..e7188da85b 100644
--- a/core/math/math_2d.h
+++ b/core/math/math_2d.h
@@ -303,7 +303,7 @@ struct Rect2 {
inline real_t distance_to(const Vector2 &p_point) const {
- real_t dist;
+ real_t dist = 0.0;
bool inside = true;
if (p_point.x < position.x) {