summaryrefslogtreecommitdiffstats
path: root/core/math/vector2.h
diff options
context:
space:
mode:
authorGiacom <giacomand@gmail.com>2019-04-07 22:40:56 +0100
committerGiacom <giacomand@gmail.com>2019-05-28 11:39:35 +0100
commitc00427add34f505cff275ea33423f1053423d646 (patch)
tree9fef14ccadd219e7050de28394a53e72209268ce /core/math/vector2.h
parent252c841d7ff5d770e8d2819e4f7955363410744b (diff)
downloadredot-engine-c00427add34f505cff275ea33423f1053423d646.tar.gz
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;