Index: trunk/src/lib/math/curve.cc
===================================================================
--- trunk/src/lib/math/curve.cc	(revision 8894)
+++ trunk/src/lib/math/curve.cc	(revision 9110)
@@ -29,5 +29,5 @@
 #include "debug.h"
 
-#include <math.h>
+#include <cmath>
 #include <stdio.h>
 
Index: trunk/src/lib/math/line.h
===================================================================
--- trunk/src/lib/math/line.h	(revision 8894)
+++ trunk/src/lib/math/line.h	(revision 9110)
@@ -24,5 +24,4 @@
 #define __LINE_H_
 
-#include <math.h>
 #include "compiler.h"
 #include "vector.h"
Index: trunk/src/lib/math/matrix.cc
===================================================================
--- trunk/src/lib/math/matrix.cc	(revision 8894)
+++ trunk/src/lib/math/matrix.cc	(revision 9110)
@@ -14,5 +14,5 @@
 */
 #include "matrix.h"
-#include <math.h>
+#include <cmath>
 
 #ifdef DEBUG
Index: trunk/src/lib/math/matrix.h
===================================================================
--- trunk/src/lib/math/matrix.h	(revision 8894)
+++ trunk/src/lib/math/matrix.h	(revision 9110)
@@ -4,5 +4,4 @@
  */
 
-#include <math.h>
 #include "vector.h"
 
Index: trunk/src/lib/math/plane.h
===================================================================
--- trunk/src/lib/math/plane.h	(revision 8894)
+++ trunk/src/lib/math/plane.h	(revision 9110)
@@ -24,5 +24,4 @@
 #define __PLANE_H_
 
-#include <math.h>
 #include "compiler.h"
 #include "vector.h"
Index: trunk/src/lib/math/quaternion.cc
===================================================================
--- trunk/src/lib/math/quaternion.cc	(revision 8894)
+++ trunk/src/lib/math/quaternion.cc	(revision 9110)
@@ -28,6 +28,4 @@
   #define PRINT(x) printf
 #endif
-
-using namespace std;
 
 /////////////////
@@ -58,19 +56,19 @@
   m[0][1] = x.y;
   m[0][2] = x.z;
-  m[0][3] = 0;
+  m[0][3] = 0.0;
   m[1][0] = y.x;
   m[1][1] = y.y;
   m[1][2] = y.z;
-  m[1][3] = 0;
+  m[1][3] = 0.0;
   m[2][0] = z.x;
   m[2][1] = z.y;
   m[2][2] = z.z;
-  m[2][3] = 0;
-  m[3][0] = 0;
-  m[3][1] = 0;
-  m[3][2] = 0;
-  m[3][3] = 1;
-
-  *this = Quaternion (m);
+  m[2][3] = 0.0;
+  m[3][0] = 0.0;
+  m[3][1] = 0.0;
+  m[3][2] = 0.0;
+  m[3][3] = 1.0;
+
+  this->from4x4(m);
 }
 
@@ -279,5 +277,5 @@
  * @param m: a 4x4 matrix in glMatrix order
  */
-Quaternion::Quaternion (float m[4][4])
+void Quaternion::from4x4(float m[4][4])
 {
 
@@ -285,5 +283,5 @@
   int    i, j, k;
 
-  int nxt[3] = {1, 2, 0};
+  static int nxt[3] = {1, 2, 0};
 
   tr = m[0][0] + m[1][1] + m[2][2];
@@ -327,9 +325,9 @@
 
 /**
- * Creates a quaternion from a 3x3 rotation matrix.
+ * applies a quaternion from a 3x3 rotation matrix.
  * @param mat The 3x3 source rotation matrix.
  * @return The equivalent 4 float quaternion.
  */
-Quaternion::Quaternion(float mat[3][3])
+void Quaternion::from3x3(float mat[3][3])
 {
   int   NXT[] = {1, 2, 0};
Index: trunk/src/lib/math/quaternion.h
===================================================================
--- trunk/src/lib/math/quaternion.h	(revision 8894)
+++ trunk/src/lib/math/quaternion.h	(revision 9110)
@@ -24,8 +24,5 @@
 #define __QUATERNION_H_
 
-#include <math.h>
 #include "compiler.h"
-//! PI the circle-constant
-#define PI 3.14159265359f
 #include "vector.h"
 
@@ -39,12 +36,16 @@
   /** creates a Default quaternion (multiplicational identity Quaternion)*/
   inline Quaternion () { w = 1; v = Vector(0,0,0); }
+  /** Copy constructor @param q the Quaternion to copy. */
+  inline Quaternion (const Quaternion& q) { w = q.w; v = q.v; };
   /** creates a Quaternion looking into the direction v @param v: the direction @param f: the value */
   inline Quaternion (const Vector& v, float f) { this->w = f; this->v = v; }
-  Quaternion (float m[4][4]);
-  Quaternion (float m[3][3]);
   /** turns a rotation along an axis into a Quaternion @param angle: the amount of radians to rotate @param axis: the axis to rotate around */
   inline Quaternion (float angle, const Vector& axis) { w = cos(angle/2.0); v = axis * sin(angle/2.0); }
   Quaternion (const Vector& dir, const Vector& up);
   Quaternion (float roll, float pitch, float yaw);
+
+  void from3x3(float m[3][3]);
+  void from4x4(float m[4][4]);
+
 
   /** @param q: the Quaternion to compare with this one. @returns true if the Quaternions are the same, false otherwise */
Index: trunk/src/lib/math/vector.cc
===================================================================
--- trunk/src/lib/math/vector.cc	(revision 8894)
+++ trunk/src/lib/math/vector.cc	(revision 9110)
@@ -29,5 +29,4 @@
 #endif
 
-using namespace std;
 
 /////////////
@@ -40,9 +39,9 @@
 Vector Vector::getNormalized() const
 {
-  float l = this->len();
-  if(unlikely(l == 1.0 || l == 0.0))
+  float length = this->len();
+  if (unlikely(length == 0.0))
     return *this;
   else
-    return (*this / l);
+    return (*this / length);
 }
 
Index: trunk/src/lib/math/vector.h
===================================================================
--- trunk/src/lib/math/vector.h	(revision 8894)
+++ trunk/src/lib/math/vector.h	(revision 9110)
@@ -24,5 +24,5 @@
 #define __VECTOR_H_
 
-#include <math.h>
+#include <cmath>
 #include "compiler.h"
 //! PI the circle-constant
@@ -42,5 +42,4 @@
   Vector (float x, float y, float z) : x(x), y(y), z(z) {}  //!< assignment constructor
   Vector () : x(0), y(0), z(0) {}
-  ~Vector () {}
 
   /** @param v: the Vecor to compare with this one @returns true, if the Vecors are the same, false otherwise */
@@ -90,5 +89,5 @@
   void scale(const Vector& v) {   x *= v.x;  y *= v.y; z *= v.z; };
   /** @returns the length of the vector */
-  inline float len() const { return sqrt (x*x+y*y+z*z); }
+  inline float len() const { return sqrt (x*x + y*y + z*z); }
   /** normalizes the vector */
   inline void normalize() { float l = len(); if( unlikely(l == 0.0))return; this->x=this->x/l; this->y=this->y/l; this->z=this->z/l; };
