summaryrefslogtreecommitdiffstats
path: root/core/math/vector2.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-06-01 12:05:18 +0200
committerGitHub <noreply@github.com>2019-06-01 12:05:18 +0200
commit3c4fab295b96c9bd852601531bf35c1ade56b54c (patch)
tree9adcec083a49ca4935ff70e1257bd492ca88df62 /core/math/vector2.h
parent64a88e8ef35d692f31d6114793468623c6756785 (diff)
parentc00427add34f505cff275ea33423f1053423d646 (diff)
downloadredot-engine-3c4fab295b96c9bd852601531bf35c1ade56b54c.tar.gz
Merge pull request #27789 from Giacom/move_towards
Added move_toward functions for float, Vector2 and Vector3
Diffstat (limited to 'core/math/vector2.h')
-rw-r--r--core/math/vector2.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/math/vector2.h b/core/math/vector2.h
index a0c6024c9f..78a1641c1e 100644
--- a/core/math/vector2.h
+++ b/core/math/vector2.h
@@ -79,6 +79,7 @@ struct Vector2 {
_FORCE_INLINE_ Vector2 linear_interpolate(const Vector2 &p_b, real_t p_t) const;
_FORCE_INLINE_ Vector2 slerp(const Vector2 &p_b, real_t p_t) const;
Vector2 cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_t) const;
+ Vector2 move_toward(const Vector2 &p_to, const real_t p_delta) const;
Vector2 slide(const Vector2 &p_normal) const;
Vector2 bounce(const Vector2 &p_normal) const;