mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-06 03:18:14 +00:00
Remove redundant axis length calculation (#3900)
This commit is contained in:
@@ -2338,8 +2338,7 @@ RMAPI Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle)
|
|||||||
float ilength = 0.0f;
|
float ilength = 0.0f;
|
||||||
|
|
||||||
// Vector3Normalize(axis)
|
// Vector3Normalize(axis)
|
||||||
Vector3 v = axis;
|
length = axisLength;
|
||||||
length = sqrtf(v.x*v.x + v.y*v.y + v.z*v.z);
|
|
||||||
if (length == 0.0f) length = 1.0f;
|
if (length == 0.0f) length = 1.0f;
|
||||||
ilength = 1.0f/length;
|
ilength = 1.0f/length;
|
||||||
axis.x *= ilength;
|
axis.x *= ilength;
|
||||||
|
Reference in New Issue
Block a user