diff options
Diffstat (limited to 'core/math/math_2d.h')
| -rw-r--r-- | core/math/math_2d.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/math/math_2d.h b/core/math/math_2d.h index 02d921b67..611d47e3f 100644 --- a/core/math/math_2d.h +++ b/core/math/math_2d.h @@ -162,6 +162,8 @@ struct Vector2 { } Vector2 floor() const; + Vector2 ceil() const; + Vector2 round() const; Vector2 snapped(const Vector2 &p_by) const; real_t aspect() const { return width / height; } @@ -303,7 +305,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) { |
