mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Rename Vector2 clamped to limit_length and add limit_length to Vector3
This commit is contained in:
@@ -84,6 +84,7 @@ struct Vector2 {
|
||||
|
||||
real_t length() const;
|
||||
real_t length_squared() const;
|
||||
Vector2 limit_length(const real_t p_len = 1.0) const;
|
||||
|
||||
Vector2 min(const Vector2 &p_vector2) const {
|
||||
return Vector2(MIN(x, p_vector2.x), MIN(y, p_vector2.y));
|
||||
@@ -107,8 +108,6 @@ struct Vector2 {
|
||||
|
||||
Vector2 plane_project(real_t p_d, const Vector2 &p_vec) const;
|
||||
|
||||
Vector2 clamped(real_t p_len) const;
|
||||
|
||||
_FORCE_INLINE_ Vector2 lerp(const Vector2 &p_to, real_t p_weight) const;
|
||||
_FORCE_INLINE_ Vector2 slerp(const Vector2 &p_to, real_t p_weight) const;
|
||||
Vector2 cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_weight) const;
|
||||
|
||||
Reference in New Issue
Block a user