diff options
| -rw-r--r-- | src/raymath.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/raymath.h b/src/raymath.h index 9d840443..7d1e3626 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); |
