Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5000 in orxonox.OLD for orxonox/trunk/src/lib/math/vector.h


Ignore:
Timestamp:
Aug 13, 2005, 9:07:56 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: smooth-rotation is better now
PNODE_MOVEMENT_ROTATE-children are correcly smooth-reparented
some other minor fixes

THIS IS 5000 :)
so
generated the endOfTheWorld-function
implemented de-generic recapitualisation Procedures
imported magnificizer
dezentralized obscurities
some other minor stuff
flush
eliminated deamons

man… i must have to much time

File:
1 edited

Legend:

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

    r4999 r5000  
    157157  inline Quaternion conjugate () const { return Quaternion(Vector(-v.x, -v.y, -v.z), this->w); };
    158158  /** @returns the norm of The Quaternion */
    159   inline float norm () const { return w*w + v.x*v.x + v.y*v.y + v.z*v.z; };
     159  inline float norm () const { return sqrt(w*w + v.x*v.x + v.y*v.y + v.z*v.z); };
    160160  /** @returns the inverted Quaterntion of this */
    161   inline Quaternion inverse () const { return conjugate() / norm(); };
     161  inline Quaternion inverse () const { return conjugate() / (w*w + v.x*v.x + v.y*v.y + v.z*v.z); };
    162162  /** @param v: the Vector  @return a new Vector representing v rotated by the Quaternion */
    163163  inline Vector apply (const Vector& v) const { return (*this * Quaternion(v, 0) * conjugate()).v; };
     
    176176
    177177  void debug();
     178  void debug2();
    178179
    179180
Note: See TracChangeset for help on using the changeset viewer.