Index: /code/trunk/src/libraries/util/ExprParser.cc
===================================================================
--- /code/trunk/src/libraries/util/ExprParser.cc	(revision 7183)
+++ /code/trunk/src/libraries/util/ExprParser.cc	(revision 7184)
@@ -33,7 +33,9 @@
 
 #include "ExprParser.h"
+
 #include <cmath>
 #include <cstring>
 #include <cstdlib>
+#include "Math.h"
 
 // macros for easier if, else statements
@@ -50,6 +52,6 @@
     {
         this->failed_ = false;
-        this->variables_["pi"] = 3.1415926535897932;
-        this->variables_["e"] = 2.7182818284590452;
+        this->variables_["pi"] = math::pi_d;
+        this->variables_["e"] = math::e_d;
     }
 
@@ -328,7 +330,7 @@
                     value = sqrt(parse_last_argument());
                 CASE("degrees")
-                    value = parse_last_argument()*180/3.1415926535897932;
+                    value = parse_last_argument()*180/math::pi_d;
                 CASE("radians")
-                    value = parse_last_argument()*3.1415926535897932/180;
+                    value = parse_last_argument()*math::pi_d/180;
                 CASE("mod")
                 {
Index: /code/trunk/src/libraries/util/Math.cc
===================================================================
--- /code/trunk/src/libraries/util/Math.cc	(revision 7183)
+++ /code/trunk/src/libraries/util/Math.cc	(revision 7184)
@@ -185,5 +185,5 @@
         float distancelength = distance.length();
         if (distancelength == 0) return orxonox::Vector2(0, 0);
-        float radius = acos(clamp<float>(mydirection.dotProduct(distance) / distancelength, -1, 1)) / Ogre::Math::PI;
+        float radius = acos(clamp<float>(mydirection.dotProduct(distance) / distancelength, -1, 1)) / math::pi;
 
         if ((mydirection.crossProduct(myorthonormal)).dotProduct(distance) > 0)
Index: /code/trunk/src/libraries/util/Math.h
===================================================================
--- /code/trunk/src/libraries/util/Math.h	(revision 7183)
+++ /code/trunk/src/libraries/util/Math.h	(revision 7184)
@@ -59,4 +59,22 @@
 namespace orxonox
 {
+    // C++ doesn't define any constants for pi, e, etc.
+    namespace math
+    {
+        const float pi      = 3.14159265f;
+        const float pi_2    = 1.57079633f;
+        const float pi_4    = 7.85398163e-1f;
+        const float e       = 2.71828183f;
+        const float sqrt2   = 1.41421356f;
+        const float sqrt2_2 = 7.07106781e-1f;
+
+        const double pi_d      = 3.14159265358979324;
+        const double pi_2_d    = 1.57079632679489662;
+        const double pi_4_d    = 7.85398163397448310e-1;
+        const double e_d       = 2.71828182845904524;
+        const double sqrt2_d   = 1.41421356237309505;
+        const double sqrt2_2_d = 7.07106781186547524e-1;
+    }
+
 #if OGRE_VERSION < 0x010603
     _UtilExport std::ostream& operator<<(std::ostream& out, const orxonox::Radian& radian);
Index: /code/trunk/src/modules/designtools/CreateStars.cc
===================================================================
--- /code/trunk/src/modules/designtools/CreateStars.cc	(revision 7183)
+++ /code/trunk/src/modules/designtools/CreateStars.cc	(revision 7184)
@@ -38,6 +38,4 @@
 {
     CreateFactory(CreateStars);
-
-    static const float pi = 3.14159265359f;
 
     CreateStars::CreateStars(BaseObject* creator) : BaseObject(creator)
@@ -90,6 +88,6 @@
             while(1)
             {
-                phi = rnd(2*pi);
-                teta = rnd(pi);
+                phi = rnd(2*math::pi);
+                teta = rnd(math::pi);
                 float random = rnd(1);
                 if(sin(teta)>random) break;
Index: /code/trunk/src/modules/overlays/hud/HUDRadar.cc
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDRadar.cc	(revision 7183)
+++ /code/trunk/src/modules/overlays/hud/HUDRadar.cc	(revision 7184)
@@ -174,5 +174,5 @@
             // calc position on radar...
             Vector2 coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition());
-            coord *= Ogre::Math::PI / 3.5f; // small adjustment to make it fit the texture
+            coord *= math::pi / 3.5f; // small adjustment to make it fit the texture
             it->second->setPosition((1.0f + coord.x - size) * 0.5f, (1.0f - coord.y - size) * 0.5f);
             it->second->show();
Index: /code/trunk/src/orxonox/controllers/AIController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/AIController.cc	(revision 7183)
+++ /code/trunk/src/orxonox/controllers/AIController.cc	(revision 7184)
@@ -220,5 +220,5 @@
                     this->moveToTargetPosition();
 
-                if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0f))
+                if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(math::pi / 20.0f))
                     this->getControllableEntity()->fire(0);
             }
@@ -253,5 +253,5 @@
                 this->moveToTargetPosition();
 
-            if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0f))
+            if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(math::pi / 20.0f))
                 this->getControllableEntity()->fire(0);
         }
Index: /code/trunk/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/ArtificialController.cc	(revision 7183)
+++ /code/trunk/src/orxonox/controllers/ArtificialController.cc	(revision 7184)
@@ -847,6 +847,6 @@
                 Vector3 distanceCurrent = this->targetPosition_ - this->getControllableEntity()->getPosition();
                 Vector3 distanceNew = it->getPosition() - this->getControllableEntity()->getPosition();
-                if (!this->target_ || it->getPosition().squaredDistance(this->getControllableEntity()->getPosition()) * (1.5f + acos((this->getControllableEntity()->getOrientation() * WorldEntity::FRONT).dotProduct(distanceNew) / speed / distanceNew.length()) / (2 * Ogre::Math::PI))
-                        < this->targetPosition_.squaredDistance(this->getControllableEntity()->getPosition()) * (1.5f + acos((this->getControllableEntity()->getOrientation() * WorldEntity::FRONT).dotProduct(distanceCurrent) / speed / distanceCurrent.length()) / (2 * Ogre::Math::PI)) + rnd(-250, 250))
+                if (!this->target_ || it->getPosition().squaredDistance(this->getControllableEntity()->getPosition()) * (1.5f + acos((this->getControllableEntity()->getOrientation() * WorldEntity::FRONT).dotProduct(distanceNew) / speed / distanceNew.length()) / (2 * math::pi))
+                        < this->targetPosition_.squaredDistance(this->getControllableEntity()->getPosition()) * (1.5f + acos((this->getControllableEntity()->getOrientation() * WorldEntity::FRONT).dotProduct(distanceCurrent) / speed / distanceCurrent.length()) / (2 * math::pi)) + rnd(-250, 250))
                 {
                     this->target_ = (*it);
Index: /code/trunk/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/NewHumanController.cc	(revision 7183)
+++ /code/trunk/src/orxonox/controllers/NewHumanController.cc	(revision 7184)
@@ -534,20 +534,20 @@
             if (distance > 0.04f && distance <= 0.59f * arrowsSize_ / 2.0f )
             {
-                this->arrowsOverlay1_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * Ogre::Math::PI) * 360.0f));
+                this->arrowsOverlay1_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * math::pi) * 360.0f));
                 this->arrowsOverlay1_->show();
             }
             else if (distance > 0.59f * arrowsSize_ / 2.0f && distance <= 0.77f * arrowsSize_ / 2.0f )
             {
-                this->arrowsOverlay2_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * Ogre::Math::PI) * 360.0f));
+                this->arrowsOverlay2_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * math::pi) * 360.0f));
                 this->arrowsOverlay2_->show();
             }
             else if (distance > 0.77f * arrowsSize_ / 2.0f && distance <= arrowsSize_ / 2.0f)
             {
-                this->arrowsOverlay3_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * Ogre::Math::PI) * 360.0f));
+                this->arrowsOverlay3_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * math::pi) * 360.0f));
                 this->arrowsOverlay3_->show();
             }
             else if (distance > arrowsSize_ / 2.0f)
             {
-                this->arrowsOverlay4_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * Ogre::Math::PI) * 360.0f));
+                this->arrowsOverlay4_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * math::pi) * 360.0f));
                 this->arrowsOverlay4_->show();
             }
Index: /code/trunk/src/orxonox/controllers/WaypointPatrolController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/WaypointPatrolController.cc	(revision 7183)
+++ /code/trunk/src/orxonox/controllers/WaypointPatrolController.cc	(revision 7184)
@@ -68,5 +68,5 @@
                 this->moveToTargetPosition();
 
-            if (this->getControllableEntity() && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0f))
+            if (this->getControllableEntity() && this->isCloseAtTarget(1000) && this->isLookingAtTarget(math::pi / 20.0f))
                 this->getControllableEntity()->fire(0);
         }
Index: /code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
===================================================================
--- /code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 7183)
+++ /code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 7184)
@@ -282,7 +282,7 @@
         if (angle < 0.0)
             angle = -angle;
-        angle -= Ogre::Math::PI * static_cast<int>(angle / (Ogre::Math::PI));
-        if (angle > Ogre::Math::PI * 0.5)
-            angle = Ogre::Math::PI - angle;
+        angle -= math::pi * static_cast<int>(angle / (math::pi));
+        if (angle > math::pi * 0.5)
+            angle = math::pi - angle;
 
         // do some mathematical fiddling for a bounding box
Index: /code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.cc
===================================================================
--- /code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.cc	(revision 7183)
+++ /code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.cc	(revision 7184)
@@ -171,21 +171,21 @@
 
                 Radian pitch = this->cameraPositionRootNode_->getOrientation().getPitch();
-                if (pitch < Radian(1.5707f) && pitch > Radian(-1.5707f))
+                if (pitch < Radian(math::pi_2) && pitch > Radian(-math::pi_2))
                 {
                     this->cameraPositionRootNode_->pitch(Radian(this->pitch_ * this->getMouseLookSpeed()));
                 }
-                else if (pitch < Radian(-1.5707f))
+                else if (pitch < Radian(-math::pi_2))
                 {
                     if (this->pitch_ > 0.0f)
                         this->cameraPositionRootNode_->pitch(Radian(this->pitch_ * this->getMouseLookSpeed()));
-                    else if (pitch < Radian(-1.571f))
-                        this->cameraPositionRootNode_->pitch(-pitch + Radian(-1.570796f));
+                    else if (pitch < Radian(-math::pi_2))
+                        this->cameraPositionRootNode_->pitch(-pitch + Radian(-math::pi_2));
                 }
-                else if (pitch > Radian(1.5707f))
+                else if (pitch > Radian(math::pi_2))
                 {
                     if (this->pitch_ < 0.0f)
                         this->cameraPositionRootNode_->pitch(Radian(this->pitch_ * this->getMouseLookSpeed()));
-                    else if (pitch > Radian(1.571f))
-                        this->cameraPositionRootNode_->pitch(-pitch + Radian(1.570796f));
+                    else if (pitch > Radian(math::pi_2))
+                        this->cameraPositionRootNode_->pitch(-pitch + Radian(math::pi_2));
                 }
                 this->weaponNode_->setOrientation(this->cameraPositionRootNode_->getOrientation());
