diff options
| author | isaac553876299 <[email protected]> | 2021-06-01 17:00:40 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-06-01 17:00:40 +0200 |
| commit | d1ac38171c7d6a64144e3a713e7da481f1f340ac (patch) | |
| tree | a4fb9accd105500f9ee122f54694b4deed303575 /src/raymath.h | |
| parent | 1a7dace57e8bd38f40fa87f30b46a855a4b71063 (diff) | |
| download | raylib-d1ac38171c7d6a64144e3a713e7da481f1f340ac.tar.gz raylib-d1ac38171c7d6a64144e3a713e7da481f1f340ac.zip | |
Update raymath.h (#1802)
Diffstat (limited to 'src/raymath.h')
| -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); |
