Explorar o código

Updated normalize()

It seems normalize() already changes the quaternion so the asignation is not needed.
irei1as %!s(int64=10) %!d(string=hai) anos
pai
achega
1733ecc315
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      Engine/source/math/mQuat.h

+ 2 - 3
Engine/source/math/mQuat.h

@@ -229,11 +229,10 @@ inline F32 QuatF::angleBetween( const QuatF & q )
 {
    // angle between two quaternions
    QuatF base(x,y,z,w);
-   base=base.normalize();
+   base.normalize();
    QuatF q_norm=q;
-   q_norm=q_norm.normalize();
+   q_norm.normalize();
    return 2.0f*mAcos(base.dot(q_norm));
 }
 
-
 #endif // _MQUAT_H_