Index: code/trunk/src/libraries/util/ExprParser.cc
===================================================================
--- code/trunk/src/libraries/util/ExprParser.cc	(revision 7184)
+++ code/trunk/src/libraries/util/ExprParser.cc	(revision 8351)
@@ -52,9 +52,9 @@
     {
         this->failed_ = false;
-        this->variables_["pi"] = math::pi_d;
-        this->variables_["e"] = math::e_d;
-    }
-
-    void ExprParser::setVariable(const std::string& varname, double value)
+        this->variables_["pi"] = math::pi;
+        this->variables_["e"] = math::e;
+    }
+
+    void ExprParser::setVariable(const std::string& varname, float value)
     {
         this->variables_[varname] = value;
@@ -78,7 +78,7 @@
     //Private functions:
     /******************/
-    double ExprParser::parse_argument()
-    {
-        double value = parse_expr_8();
+    float ExprParser::parse_argument()
+    {
+        float value = parse_expr_8();
         if (*reading_stream == ',')
         {
@@ -93,7 +93,7 @@
     }
 
-    double ExprParser::parse_last_argument()
-    {
-        double value = parse_expr_8();
+    float ExprParser::parse_last_argument()
+    {
+        float value = parse_expr_8();
         if (*reading_stream == ')')
         {
@@ -108,7 +108,7 @@
     }
 
-    double ExprParser::parse_expr_8()
-    {
-        double value = parse_expr_7();
+    float ExprParser::parse_expr_8()
+    {
+        float value = parse_expr_7();
         for(;;)
         {
@@ -124,7 +124,7 @@
 
 
-    double ExprParser::parse_expr_7()
-    {
-        double value = parse_expr_6();
+    float ExprParser::parse_expr_7()
+    {
+        float value = parse_expr_6();
         for(;;)
         {
@@ -139,7 +139,7 @@
     }
 
-    double ExprParser::parse_expr_6()
-    {
-        double value = parse_expr_5();
+    float ExprParser::parse_expr_6()
+    {
+        float value = parse_expr_5();
         for(;;)
         {
@@ -158,7 +158,7 @@
     }
 
-    double ExprParser::parse_expr_5()
-    {
-        double value = parse_expr_4();
+    float ExprParser::parse_expr_5()
+    {
+        float value = parse_expr_4();
         for(;;)
         {
@@ -183,7 +183,7 @@
     }
 
-    double ExprParser::parse_expr_4()
-    {
-        double value = parse_expr_3();
+    float ExprParser::parse_expr_4()
+    {
+        float value = parse_expr_3();
         for(;;)
         {
@@ -202,7 +202,7 @@
     }
 
-    double ExprParser::parse_expr_3()
-    {
-        double value = parse_expr_2();
+    float ExprParser::parse_expr_3()
+    {
+        float value = parse_expr_2();
         for(;;)
         {
@@ -217,5 +217,5 @@
             case modulo:
                 {
-                    double temp = parse_expr_2();
+                    float temp = parse_expr_2();
                     value = value - floor(value/temp)*temp;
                     break;
@@ -227,7 +227,7 @@
     }
 
-    double ExprParser::parse_expr_2()
-    {
-        double value = parse_expr_1();
+    float ExprParser::parse_expr_2()
+    {
+        float value = parse_expr_1();
         while (*reading_stream != '\0')
         {
@@ -246,8 +246,8 @@
     }
 
-    double ExprParser::parse_expr_1()
+    float ExprParser::parse_expr_1()
     {
         PARSE_BLANKS;
-        double value;
+        float value;
 
         unary_operator op = parse_unary_operator();
@@ -262,5 +262,5 @@
         else if ((*reading_stream > 47 && *reading_stream < 59) || *reading_stream == 46)
         {  // number
-            value = strtod(reading_stream, const_cast<char**>(&reading_stream));
+            value = (float)strtod(reading_stream, const_cast<char**>(&reading_stream));
         }
         else if ((*reading_stream > 64 && *reading_stream < 91) || (*reading_stream > 96 && *reading_stream < 123) || *reading_stream == 46)
@@ -306,5 +306,5 @@
                 {
                     value = parse_last_argument();
-                    value = 0.5*log((value + 1)/(value - 1));
+                    value = 0.5f*log((value + 1.0f)/(value - 1.0f));
                 }
                 CASE("int")
@@ -325,16 +325,16 @@
                 {
                     value = parse_last_argument();
-                    value = (value>0 ? 1 : (value<0 ? -1 : 0));
+                    value = (value>0.0f ? 1.0f : (value<0.0f ? -1.0f : 0.0f));
                 }
                 CASE("sqrt")
                     value = sqrt(parse_last_argument());
                 CASE("degrees")
-                    value = parse_last_argument()*180/math::pi_d;
+                    value = parse_last_argument()*180.0f/math::pi;
                 CASE("radians")
-                    value = parse_last_argument()*math::pi_d/180;
+                    value = parse_last_argument()*math::pi/180.0f;
                 CASE("mod")
                 {
                     value = parse_argument();
-                    double value2 = parse_last_argument();
+                    float value2 = parse_last_argument();
                     value = value - floor(value/value2)*value2;
                 }
@@ -356,5 +356,5 @@
             else
             {
-                std::map<std::string, double>::const_iterator it = this->variables_.find(word);
+                std::map<std::string, float>::const_iterator it = this->variables_.find(word);
                 if (it != this->variables_.end())
                     value = it->second;
