diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2021-02-01 00:42:00 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2021-06-03 12:04:57 -0400 |
commit | 94bc0bd9193d5e361bbe657d59a492467f129721 (patch) | |
tree | 2adf53e9a8efb9d027961eeb0c5726e47be9bbe1 /core/math/vector2.h | |
parent | f288a79482ad5272d872fdc84fdb64a228334d8e (diff) | |
download | redot-engine-94bc0bd9193d5e361bbe657d59a492467f129721.tar.gz |
Rename Vector2 clamped to limit_length and add limit_length to Vector3
Diffstat (limited to 'core/math/vector2.h')
-rw-r--r-- | core/math/vector2.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/math/vector2.h b/core/math/vector2.h index 6abe0f5ea9..2a540bd8aa 100644 --- a/core/math/vector2.h +++ b/core/math/vector2.h @@ -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; |