]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/Math.hpp
latest updates from JSBSim
[flightgear.git] / src / FDM / YASim / Math.hpp
index 9407c2a9aa3a01596995258848f446e0e5c081c8..e729f6d72dd0200f620906e432938a772c91a8bd 100644 (file)
@@ -6,25 +6,35 @@ namespace yasim {
 class Math
 {
 public:
+    // Dumb utilities
+    static float clamp(float val, float min, float max);
+
     // Simple wrappers around library routines
     static float abs(float f);
     static float sqrt(float f);
-    static float pow(float base, float exp);
     static float ceil(float f);
     static float sin(float f);
     static float cos(float f);
     static float tan(float f);
+    static float atan(float f);
     static float atan2(float y, float x);
+    static float asin(float f);
+    static float acos(float f);
+    static float exp(float f);
+    static float sqr(float f) {return f*f;}
+
+    // Takes two args and runs afoul of the Koenig rules.
+    static float pow(double base, double exp);
 
     // double variants of the above
     static double abs(double f);
     static double sqrt(double f);
-    static double pow(double base, double exp);
     static double ceil(double f);
     static double sin(double f);
     static double cos(double f);
     static double tan(double f);
     static double atan2(double y, double x);
+    static double floor(double x);
 
     // Some 3D vector stuff.  In all cases, it is permissible for the
     // "out" vector to be the same as one of the inputs.