From d1ac38171c7d6a64144e3a713e7da481f1f340ac Mon Sep 17 00:00:00 2001
From: isaac553876299 <60979696+isaac553876299@users.noreply.github.com>
Date: Tue, 1 Jun 2021 17:00:40 +0200
Subject: [PATCH] Update raymath.h (#1802)

---
 src/raymath.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/raymath.h b/src/raymath.h
index 9d840443d..7d1e36266 100644
--- a/src/raymath.h
+++ b/src/raymath.h
@@ -326,7 +326,7 @@ RMDEF Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance)
     float dy = target.y - v.y;
     float value = (dx*dx) + (dy*dy);
 
-    if ((value == 0) || ((maxDistance >= 0) && (value <= maxDistance*maxDistance))) result = target;
+    if ((value == 0) || ((maxDistance >= 0) && (value <= maxDistance * maxDistance))) return target;
 
     float dist = sqrtf(value);