Browse Source

Remove redundant axis length calculation (#3900)

pull/3901/head
jtainer 8 months ago
committed by GitHub
parent
commit
1b14c082ed
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      src/raymath.h

+ 1
- 2
src/raymath.h 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;

Loading…
Cancel
Save