]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/Math.cpp
Fix bug 141, by ensuring certain subsystems are assigned to the 'post FDM' group...
[flightgear.git] / src / FDM / YASim / Math.cpp
index b5d2c4e65afb7be7ee7484369aeadbd686d17b59..2c53c35590fdbbc30e1be9f180803d17acee0c76 100644 (file)
@@ -12,37 +12,57 @@ float Math::clamp(float val, float min, float max)
 
 float Math::abs(float f)
 {
-    return ::fabs(f);
+    return (float)::fabs(f);
 }
 
 float Math::sqrt(float f)
 {
-    return ::sqrt(f);
+    return (float)::sqrt(f);
 }
 
 float Math::ceil(float f)
 {
-    return ::ceil(f);
+    return (float)::ceil(f);
+}
+
+float Math::acos(float f)
+{
+    return (float)::acos(f);
+}
+
+float Math::asin(float f)
+{
+    return (float)::asin(f);
 }
 
 float Math::cos(float f)
 {
-    return ::cos(f);
+    return (float)::cos(f);
 }
 
 float Math::sin(float f)
 {
-    return ::sin(f);
+    return (float)::sin(f);
 }
 
 float Math::tan(float f)
 {
-    return ::tan(f);
+    return (float)::tan(f);
+}
+
+float Math::atan(float f)
+{
+    return (float)::atan(f);
 }
 
 float Math::atan2(float y, float x)
 {
-    return ::atan2(y, x);
+    return (float)::atan2(y, x);
+}
+
+double Math::floor(double x)
+{
+    return ::floor(x);
 }
 
 double Math::abs(double f)
@@ -57,7 +77,12 @@ double Math::sqrt(double f)
 
 float Math::pow(double base, double exp)
 {
-    return ::pow(base, exp);
+    return (float)::pow(base, exp);
+}
+
+float Math::exp(float f)
+{
+    return (float)::exp(f);
 }
 
 double Math::ceil(double f)
@@ -123,7 +148,6 @@ float Math::mag3(float* v)
     return sqrt(dot3(v, v));
 }
 
-
 void Math::unit3(float* v, float* out)
 {
     float imag = 1/mag3(v);