Index: orxonox/trunk/src/lib/coord/p_node.cc
===================================================================
--- orxonox/trunk/src/lib/coord/p_node.cc	(revision 4996)
+++ orxonox/trunk/src/lib/coord/p_node.cc	(revision 4997)
@@ -339,5 +339,5 @@
 {
   if (this->parent)
-    this->relDirection = absDir * parent->getAbsDir().inverse();
+    this->relDirection = absDir / parent->getAbsDir();
   else
     this->relDirection = absDir;
@@ -489,5 +489,5 @@
   this->setRelCoor(tmpV - parentNode->getAbsCoor());
 
-  this->setRelDir(tmpQ * parentNode->getAbsDir().inverse());
+  this->setRelDir(tmpQ / parentNode->getAbsDir());
 }
 
@@ -543,5 +543,6 @@
       if (unlikely(this->toDirection != NULL))
       {
-        Quaternion rotQuat = (*this->toDirection * this->getRelDir().inverse()) *dt*bias;
+        Quaternion rotQuat = (*this->toDirection / this->getRelDir()) *dt*bias;
+        rotQuat.debug();
 //        if (likely(rotQuat.len() >= .001))
         {
Index: orxonox/trunk/src/lib/math/vector.cc
===================================================================
--- orxonox/trunk/src/lib/math/vector.cc	(revision 4996)
+++ orxonox/trunk/src/lib/math/vector.cc	(revision 4997)
@@ -158,85 +158,4 @@
 
   return r;
-}
-
-/**
- *  rotate a Vector by a Quaternion
- * @param v: the Vector
- * @return a new Vector representing v rotated by the Quaternion
-*/
-
-Vector Quaternion::apply (const Vector& v) const
-{
-  Quaternion q;
-  q.v = v;
-  q.w = 0;
-  q = *this * q * conjugate();
-  return q.v;
-}
-
-
-/**
- *  multiply a Quaternion with a real value
- * @param f: a real value
- * @return a new Quaternion containing the product
-*/
-Quaternion Quaternion::operator*(const float& f) const
-{
-  Quaternion r(*this);
-  r.w = r.w*f;
-  r.v = r.v*f;
-  return r;
-}
-
-/**
- *  divide a Quaternion by a real value
- * @param f: a real value
- * @return a new Quaternion containing the quotient
-*/
-Quaternion Quaternion::operator/(const float& f) const
-{
-  if( f == 0) return Quaternion();
-  Quaternion r(*this);
-  r.w = r.w/f;
-  r.v = r.v/f;
-  return r;
-}
-
-/**
- *  calculate the conjugate value of the Quaternion
- * @return the conjugate Quaternion
-*/
-/*
-Quaternion Quaternion::conjugate() const
-{
-  Quaternion r(*this);
-  r.v = Vector() - r.v;
-  return r;
-}
-*/
-
-/**
- *  calculate the norm of the Quaternion
- * @return the norm of The Quaternion
-*/
-float Quaternion::norm() const
-{
-  return w*w + v.x*v.x + v.y*v.y + v.z*v.z;
-}
-
-/**
- *  calculate the inverse value of the Quaternion
- * @return the inverse Quaternion
-
-        Note that this is equal to conjugate() if the Quaternion's norm is 1
-*/
-Quaternion Quaternion::inverse() const
-{
-  float n = norm();
-  if (n != 0)
-    {
-      return conjugate() / norm();
-    }
-  else return Quaternion();
 }
 
Index: orxonox/trunk/src/lib/math/vector.h
===================================================================
--- orxonox/trunk/src/lib/math/vector.h	(revision 4996)
+++ orxonox/trunk/src/lib/math/vector.h	(revision 4997)
@@ -54,5 +54,5 @@
   inline const Vector& operator*= (float f) { this->x *= f; this->y *= f; this->z *= f; return *this; };
   /** @param f a factor to divide the vector with @returns the vector divided by f (this / f) */
-  inline Vector operator/ (float f) const {return (unlikely(f == 0.0))?Vector(0,0,0):Vector(this->x / f, this->y / f, this->z / f); };
+  inline Vector operator/ (float f) const { return (unlikely(f == 0.0))?Vector(0,0,0):Vector(this->x / f, this->y / f, this->z / f); };
   /** @param f a factor to divide the vector with @returns the vector divided by f (this /= f) */
   inline const Vector& operator/= (float f) {if (unlikely(f == 0.0)) {this->x=0;this->y=0;this->z=0;} else {this->x /= f; this->y /= f; this->z /= f;} return *this; };
@@ -124,13 +124,19 @@
   Quaternion (const Vector& dir, const Vector& up);
   Quaternion (float roll, float pitch, float yaw);
-  Quaternion operator/ (const float& f) const;
+  /** @param f: a real value @return a Quaternion containing the quotient */
+  inline Quaternion operator/ (const float& f) const { return (unlikely(f==0.0)) ? Quaternion() : Quaternion(this->v/f, this->w/f); };
   /** @param f: the value to divide by @returns the quaternion devided by f (this /= f) */
   inline const Quaternion& operator/= (const float& f) {*this = *this / f; return *this;}
-  Quaternion operator* (const float& f) const;
+  /** @param f: a real value @return a Quaternion containing the product */
+  inline Quaternion operator* (const float& f) const { return Quaternion(this->v*f, this->w*f); };
   /** @param f: the value to multiply by @returns the quaternion multiplied by f (this *= f) */
   inline const Quaternion& operator*= (const float& f) {*this = *this * f; return *this;}
   Quaternion operator* (const Quaternion& q) const;
   /** @param q: the Quaternion to multiply by @returns the quaternion multiplied by q (this *= q) */
-  inline const Quaternion operator*= (const Quaternion& q) {*this = *this * q; return *this; };
+  inline const Quaternion& operator*= (const Quaternion& q) {*this = *this * q; return *this; };
+  /** @param q the Quaternion by which to devide @returns the division from this by q (this / q) */
+  inline Quaternion operator/ (const Quaternion& q) const { return *this * q.inverse(); };
+  /** @param q the Quaternion by which to devide @returns the division from this by q (this /= q) */
+  inline const Quaternion& operator/= (const Quaternion& q) { *this = *this * q.inverse(); return *this; };
   /** @param q the Quaternion to add to this @returns the quaternion added with q (this + q) */
   inline Quaternion operator+ (const Quaternion& q) const { return Quaternion(q.v + v, q.w + w); };
@@ -144,8 +150,11 @@
   inline Quaternion operator= (const Quaternion& q) {this->v = q.v; this->w = q.w; return *this;}
   /** conjugates this Quaternion @returns the conjugate */
-  inline Quaternion conjugate () const {  Quaternion r(*this);  r.v = Vector() - r.v;  return r;}
-  Quaternion inverse () const;
-  Vector apply (const Vector& f) const;
-  float norm () const;
+  inline Quaternion conjugate () const { Quaternion r(*this); r.v = Vector() - r.v; return r; };
+  /** @returns the norm of The Quaternion */
+  inline float norm () const { return w*w + v.x*v.x + v.y*v.y + v.z*v.z; };
+  /** @returns the inverted Quaterntion of this */
+  inline Quaternion inverse () const { return conjugate() / norm(); };
+  /** @param v: the Vector  @return a new Vector representing v rotated by the Quaternion */
+  inline Vector apply (const Vector& v) const { return (*this * Quaternion(v, 0) * conjugate()).v; };
   void matrix (float m[4][4]) const;
 
@@ -270,2 +279,3 @@
 
 #endif /* _VECTOR_H */
+
