Skip to content

Commit

Permalink
Remove redundant axis length calculation (#3900)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtainer authored Apr 6, 2024
1 parent 414229b commit 1b14c08
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/raymath.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1b14c08

Please sign in to comment.