Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3824 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Apr 14, 2005, 1:16:59 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: redefined quaternion multiplication. it was more efficient as it was. reverted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/math/vector.cc

    r3823 r3824  
    286286  H = (w   - v.y)*(q.w   + q.v.z);
    287287 
    288   return Quaternion(Vector(A - (E + F + G + H)/2, C + (E - F + G - H)/2, D + (E - F - G + H)/2), B +  (-E - F + G + H)/2);
     288  Quaternion r;
     289  r.v.x = A - (E + F + G + H)/2;
     290  r.v.y = C + (E - F + G - H)/2;
     291  r.v.z = D + (E - F - G + H)/2;
     292  r.w = B +  (-E - F + G + H)/2;
     293
     294  return r;
    289295}
    290296
Note: See TracChangeset for help on using the changeset viewer.