diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/raymath.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/raymath.h b/src/raymath.h index 399c2f6c..898e48ae 100644 --- a/src/raymath.h +++ b/src/raymath.h @@ -328,8 +328,9 @@ RMAPI Vector2 Vector2Normalize(Vector2 v) if (length > 0) { - result.x = v.x*1.0f/length; - result.y = v.y*1.0f/length; + float ilength = 1.0f / length; + result.x = v.x * ilength; + result.y = v.y * ilength; } return result; |
