diff options
Diffstat (limited to 'modules/gdnative/gdnative/vector2.cpp')
-rw-r--r-- | modules/gdnative/gdnative/vector2.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdnative/gdnative/vector2.cpp b/modules/gdnative/gdnative/vector2.cpp index 8fa29580d6..a2ac61b35e 100644 --- a/modules/gdnative/gdnative/vector2.cpp +++ b/modules/gdnative/gdnative/vector2.cpp @@ -119,6 +119,14 @@ godot_vector2 GDAPI godot_vector2_cubic_interpolate(const godot_vector2 *p_self, return dest; } +godot_vector2 GDAPI godot_vector2_move_toward(const godot_vector2 *p_self, const godot_vector2 *p_to, const godot_real p_delta) { + godot_vector2 dest; + const Vector2 *self = (const Vector2 *)p_self; + const Vector2 *to = (const Vector2 *)p_to; + *((Vector2 *)&dest) = self->move_toward(*to, p_delta); + return dest; +} + godot_vector2 GDAPI godot_vector2_rotated(const godot_vector2 *p_self, const godot_real p_phi) { godot_vector2 dest; const Vector2 *self = (const Vector2 *)p_self; |