mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-13 14:58:15 +00:00
simplify QuaternionInvert (#2324)
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user