simplify QuaternionInvert (#2324)

This commit is contained in:
megagrump 2022-01-31 09:39:21 +01:00 committed by GitHub
parent 680cc72d43
commit c54d9cd552
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1490,8 +1490,7 @@ RMAPI Quaternion QuaternionInvert(Quaternion q)
{
Quaternion result = q;
float length = sqrtf(q.x*q.x + q.y*q.y + q.z*q.z + q.w*q.w);
float lengthSq = length*length;
float lengthSq = q.x*q.x + q.y*q.y + q.z*q.z + q.w*q.w;
if (lengthSq != 0.0)
{