diff options
| author | jtainer <[email protected]> | 2024-04-06 07:56:20 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-06 13:56:20 +0200 |
| commit | 1b14c082ed92db66a2fea40f415b506aefdab084 (patch) | |
| tree | 16f0b13430e9ad212809eaca3193cfe0156f228e /src/raymath.h | |
| parent | 414229bcf93816daaa253a82cd54fbd7b18e6449 (diff) | |
| download | raylib-1b14c082ed92db66a2fea40f415b506aefdab084.tar.gz raylib-1b14c082ed92db66a2fea40f415b506aefdab084.zip | |
Remove redundant axis length calculation (#3900)
Diffstat (limited to 'src/raymath.h')
| -rw-r--r-- | src/raymath.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/raymath.h b/src/raymath.h index 96f2c2cd..3bafab51 100644 --- a/src/raymath.h +++ b/src/raymath.h @@ -2338,8 +2338,7 @@ RMAPI Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle) float ilength = 0.0f; // Vector3Normalize(axis) - Vector3 v = axis; - length = sqrtf(v.x*v.x + v.y*v.y + v.z*v.z); + length = axisLength; if (length == 0.0f) length = 1.0f; ilength = 1.0f/length; axis.x *= ilength; |
