- Timestamp:
- Apr 14, 2005, 1:09:55 AM (20 years ago)
- Location:
- orxonox/trunk/src/lib/math
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/math/vector.cc
r3822 r3823 332 332 q = *this * q * conjugate(); 333 333 return q.v; 334 } 334 } 335 335 336 336 337 /** … … 365 366 \return the conjugate Quaternion 366 367 */ 368 /* 367 369 Quaternion Quaternion::conjugate() const 368 370 { … … 371 373 return r; 372 374 } 375 */ 373 376 374 377 /** -
orxonox/trunk/src/lib/math/vector.h
r3822 r3823 80 80 inline Quaternion operator+ (const Quaternion& q) const { return Quaternion(q.v + v, q.w + w); } 81 81 inline Quaternion operator- (const Quaternion& q) const { return Quaternion(q.v - v, q.w - w); } 82 Quaternion conjugate () const; 82 Quaternion conjugate () const { Quaternion r(*this); 83 r.v = Vector() - r.v; 84 return r;} 83 85 Quaternion inverse () const; 84 Vector apply (Vector& f) const ;//{ Quaternion q; q.v = v; q.w = 0; q = *this * q * conjugate(); return q.v; }86 Vector apply (Vector& f) const; 85 87 float norm () const; 86 88 void matrix (float m[4][4]) const;
Note: See TracChangeset
for help on using the changeset viewer.