simplify QuaternionInvert (#2324)
This commit is contained in:
parent
680cc72d43
commit
c54d9cd552
1 changed files with 4 additions and 5 deletions
|
@ -1490,8 +1490,7 @@ RMAPI Quaternion QuaternionInvert(Quaternion q)
|
||||||
{
|
{
|
||||||
Quaternion result = 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 = q.x*q.x + q.y*q.y + q.z*q.z + q.w*q.w;
|
||||||
float lengthSq = length*length;
|
|
||||||
|
|
||||||
if (lengthSq != 0.0)
|
if (lengthSq != 0.0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue