Skip to content

Commit 1b14c08

Browse files
authored
Remove redundant axis length calculation (#3900)
1 parent 414229b commit 1b14c08

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/raymath.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -2338,8 +2338,7 @@ RMAPI Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle)
23382338
float ilength = 0.0f;
23392339

23402340
// Vector3Normalize(axis)
2341-
Vector3 v = axis;
2342-
length = sqrtf(v.x*v.x + v.y*v.y + v.z*v.z);
2341+
length = axisLength;
23432342
if (length == 0.0f) length = 1.0f;
23442343
ilength = 1.0f/length;
23452344
axis.x *= ilength;

0 commit comments

Comments
 (0)