diff --git a/core/math/vector2.cpp b/core/math/vector2.cpp index ce4912335..e54812368 100644 --- a/core/math/vector2.cpp +++ b/core/math/vector2.cpp @@ -129,18 +129,6 @@ Vector2 Vector2::snapped(const Vector2 &p_by) const { Math::stepify(y, p_by.y)); } -Vector2 Vector2::clamped(real_t p_len) const { - WARN_DEPRECATED_MSG("'Vector2.clamped()' is deprecated because it has been renamed to 'limit_length'."); - real_t l = length(); - Vector2 v = *this; - if (l > 0 && p_len < l) { - v /= l; - v *= p_len; - } - - return v; -} - Vector2 Vector2::limit_length(const real_t p_len) const { const real_t l = length(); Vector2 v = *this; diff --git a/core/math/vector2.h b/core/math/vector2.h index 4cfbd60c1..1d4320759 100644 --- a/core/math/vector2.h +++ b/core/math/vector2.h @@ -111,8 +111,6 @@ struct _NO_DISCARD_CLASS_ Vector2 { Vector2 plane_project(real_t p_d, const Vector2 &p_vec) const; - Vector2 clamped(real_t p_len) const; - _FORCE_INLINE_ static Vector2 linear_interpolate(const Vector2 &p_a, const Vector2 &p_b, real_t p_weight); _FORCE_INLINE_ Vector2 linear_interpolate(const Vector2 &p_to, real_t p_weight) const; _FORCE_INLINE_ Vector2 slerp(const Vector2 &p_to, real_t p_weight) const; diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 84e75478e..b46d5b67b 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -534,7 +534,6 @@ struct _VariantCall { VCALL_LOCALMEM1R(Vector2, posmodv); VCALL_LOCALMEM1R(Vector2, project); VCALL_LOCALMEM2R(Vector2, plane_project); - VCALL_LOCALMEM1R(Vector2, clamped); VCALL_LOCALMEM2R(Vector2, linear_interpolate); VCALL_LOCALMEM2R(Vector2, slerp); VCALL_LOCALMEM4R(Vector2, cubic_interpolate); @@ -2636,7 +2635,6 @@ void register_variant_methods() { ADDFUNC1R(VECTOR2, VECTOR2, Vector2, posmodv, VECTOR2, "modv", varray()); ADDFUNC1R(VECTOR2, VECTOR2, Vector2, project, VECTOR2, "b", varray()); ADDFUNC2R(VECTOR2, VECTOR2, Vector2, plane_project, REAL, "d", VECTOR2, "vec", varray()); - ADDFUNC1R(VECTOR2, VECTOR2, Vector2, clamped, REAL, "length", varray()); ADDFUNC2R(VECTOR2, VECTOR2, Vector2, linear_interpolate, VECTOR2, "to", REAL, "weight", varray()); ADDFUNC2R(VECTOR2, VECTOR2, Vector2, slerp, VECTOR2, "to", REAL, "weight", varray()); ADDFUNC4R(VECTOR2, VECTOR2, Vector2, cubic_interpolate, VECTOR2, "b", VECTOR2, "pre_a", VECTOR2, "post_b", REAL, "weight", varray());