Index: orxonox/branches/particleEngine/src/lib/math/vector.cc
===================================================================
--- orxonox/branches/particleEngine/src/lib/math/vector.cc	(revision 3962)
+++ orxonox/branches/particleEngine/src/lib/math/vector.cc	(revision 3963)
@@ -100,5 +100,5 @@
 */
 
-const Vector Vector::getNormalized()
+Vector Vector::getNormalized()
 {
   float l = len();
@@ -109,8 +109,8 @@
   else if(unlikely(l == 0.0))
     {
-      return Vector();
+      return *this;
     }
 
-  return Vector(x / l, y /l, z / l);
+  return *this / l;
 }
 
@@ -438,7 +438,8 @@
    \param to to where
    \param t the time this transformation should take
-   \param res The approximation-density
-*/
-void Quaternion::quatSlerp(const Quaternion* from, const Quaternion* to, float t, Quaternion* res)
+
+   \returns the Result of the smooth move
+*/
+Quaternion Quaternion::quatSlerp(const Quaternion& from, const Quaternion& to, float t)
 {
   float tol[4];
@@ -446,40 +447,49 @@
   DELTA = 0.2;
 
-  cosom = from->v.x * to->v.x + from->v.y * to->v.y + from->v.z * to->v.z + from->w * to->w;
+  cosom = from.v.x * to.v.x + from.v.y * to.v.y + from.v.z * to.v.z + from.w * to.w;
 
   if( cosom < 0.0 ) 
     { 
       cosom = -cosom; 
-      tol[0] = -to->v.x;
-      tol[1] = -to->v.y;
-      tol[2] = -to->v.z;
-      tol[3] = -to->w;
+      tol[0] = -to.v.x;
+      tol[1] = -to.v.y;
+      tol[2] = -to.v.z;
+      tol[3] = -to.w;
     }
   else
     {
-      tol[0] = to->v.x;
-      tol[1] = to->v.y;
-      tol[2] = to->v.z;
-      tol[3] = to->w;
+      tol[0] = to.v.x;
+      tol[1] = to.v.y;
+      tol[2] = to.v.z;
+      tol[3] = to.w;
     }
   
   //if( (1.0 - cosom) > DELTA )
   //{
-      omega = acos(cosom);
-      sinom = sin(omega);
-      scale0 = sin((1.0 - t) * omega) / sinom;
-      scale1 = sin(t * omega) / sinom;
-      //}
-      /*
-  else
+  omega = acos(cosom);
+  sinom = sin(omega);
+  scale0 = sin((1.0 - t) * omega) / sinom;
+  scale1 = sin(t * omega) / sinom;
+  //}
+  /*
+    else
     {
-      scale0 = 1.0 - t;
-      scale1 = t;
+    scale0 = 1.0 - t;
+    scale1 = t;
     }
-      */
-  res->v.x = scale0 * from->v.x + scale1 * tol[0];
-  res->v.y = scale0 * from->v.y + scale1 * tol[1];
-  res->v.z = scale0 * from->v.z + scale1 * tol[2];
-  res->w = scale0 * from->w + scale1 * tol[3];
+  */
+
+
+  /*
+    Quaternion res;
+    res.v.x = scale0 * from.v.x + scale1 * tol[0];
+    res.v.y = scale0 * from.v.y + scale1 * tol[1];
+    res.v.z = scale0 * from.v.z + scale1 * tol[2];
+    res.w = scale0 * from.w + scale1 * tol[3];
+  */
+  return Quaternion(scale0 * from.w + scale1 * tol[3], 
+		    Vector(scale0 * from.v.x + scale1 * tol[0],
+			   scale0 * from.v.y + scale1 * tol[1],
+			   scale0 * from.v.z + scale1 * tol[2]));
 }
 
Index: orxonox/branches/particleEngine/src/lib/math/vector.h
===================================================================
--- orxonox/branches/particleEngine/src/lib/math/vector.h	(revision 3962)
+++ orxonox/branches/particleEngine/src/lib/math/vector.h	(revision 3963)
@@ -31,14 +31,14 @@
 
   inline Vector operator+ (const Vector& v) const { return Vector(x + v.x, y + v.y, z + v.z); }
-  inline const Vector operator+= (const Vector& v) {this->x += v.x; this->y += v.y; this->z += v.z; return *this;}
+  inline const Vector& operator+= (const Vector& v) {this->x += v.x; this->y += v.y; this->z += v.z; return *this;}
   inline Vector operator- (const Vector& v) const { return Vector(x - v.x, y - v.y, z - v.z); }
-  inline const Vector operator-= (const Vector& v) {this->x -= v.x; this->y -= v.y; this->z -= v.z; return *this;}
+  inline const Vector& operator-= (const Vector& v) {this->x -= v.x; this->y -= v.y; this->z -= v.z; return *this;}
   inline float operator* (const Vector& v) const { return x * v.x + y * v.y + z * v.z; }
-  inline const Vector operator*= (const Vector& v) {this->x *= v.x; this->y *= v.y; this->z *= v.z; return *this;}
+  inline const Vector& operator*= (const Vector& v) {this->x *= v.x; this->y *= v.y; this->z *= v.z; return *this;}
   inline Vector operator* (float f) const { return Vector(x * f, y * f, z * f); }
-  inline const Vector operator*= (float f) {this->x *= f; this->y *= f; this->z *= f; return *this;}
+  inline const Vector& operator*= (float f) {this->x *= f; this->y *= f; this->z *= f; return *this;}
   Vector operator/ (float f) const;
-  inline const Vector operator/= (float f) {this->x /= f; this->y /= f; this->z /= f; return *this;}
-  inline const Vector operator= (const Vector& v) {this->x = v.x; this->y = v.y; this->z = v.z; return *this;}
+  inline const Vector& operator/= (float f) {this->x /= f; this->y /= f; this->z /= f; return *this;}
+  inline const Vector& operator= (const Vector& v) {this->x = v.x; this->y = v.y; this->z = v.z; return *this;}
   float dot (const Vector& v) const;
   inline Vector cross (const Vector& v) const { return Vector(y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x ); }
@@ -56,5 +56,5 @@
 		      z = z / l; 
                     }
-  const Vector getNormalized();
+  Vector getNormalized();
   Vector abs();
 
@@ -82,8 +82,13 @@
   Quaternion (float roll, float pitch, float yaw);
   Quaternion operator/ (const float& f) const;
+  inline const Quaternion operator/= (const float& f) {*this = *this / f; return *this;}
   Quaternion operator* (const float& f) const;
+  inline const Quaternion operator*= (const float& f) {*this = *this * f; return *this;}
   Quaternion operator* (const Quaternion& q) const;
+  inline const Quaternion operator*= (const Quaternion& q) {*this = *this * q; return *this;}
   inline Quaternion operator+ (const Quaternion& q) const { return Quaternion(q.v + v, q.w + w); }
+  inline const Quaternion& operator+= (const Quaternion& q) {this->v += q.v; this->w += q.w; return *this;}
   inline Quaternion operator- (const Quaternion& q) const { return Quaternion(q.v - v, q.w - w); }
+  inline const Quaternion& operator-= (const Quaternion& q) {this->v -= q.v; this->w -= q.w; return *this;}
   inline Quaternion operator= (const Quaternion& q) {this->v = q.v; this->w = q.w; return *this;}
   Quaternion conjugate () const {  Quaternion r(*this);
@@ -94,5 +99,5 @@
   float norm () const;
   void matrix (float m[4][4]) const;
-  void quatSlerp(const Quaternion* from, const Quaternion* to, const float t, Quaternion* res);
+  Quaternion quatSlerp(const Quaternion& from, const Quaternion& to, float t);
   
   void debug();
