Remove redundant axis length calculation (#3900)

This commit is contained in:
jtainer
2024-04-06 07:56:20 -04:00
committed by GitHub
parent 414229bcf9
commit 1b14c082ed

View File

@@ -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;