/**
* Math functions.
*/
-class RS_Math
+class Math
{
-public:
- static int round(double v);
- static double pow(double x, double y);
- static double rad2deg(double a);
- static double deg2rad(double a);
- static double rad2gra(double a);
- static int findGCD(int a, int b);
- static bool isAngleBetween(double a, double a1, double a2, bool reversed);
- static double correctAngle(double a);
- static double getAngleDifference(double a1, double a2);
- static double makeAngleReadable(double angle, bool readable = true, bool * corrected = NULL);
- static bool isAngleReadable(double angle);
- static bool isSameDirection(double dir1, double dir2, double tol);
- static double eval(const QString & expr, double def = 0.0);
- static bool cmpDouble(double v1, double v2, double tol = 0.001);
- static double eval(const QString & expr, bool * ok);
- static QString doubleToString(double value, double prec);
- static QString doubleToString(double value, int prec);
+ public:
+ static int round(double v);
+ static double pow(double x, double y);
+ static double rad2deg(double a);
+ static double deg2rad(double a);
+ static double rad2gra(double a);
+ static int findGCD(int a, int b);
+ static bool isAngleBetween(double a, double a1, double a2, bool reversed);
+ static double correctAngle(double a);
+ static double getAngleDifference(double a1, double a2);
+ static double makeAngleReadable(double angle, bool readable = true, bool * corrected = NULL);
+ static bool isAngleReadable(double angle);
+ static bool isSameDirection(double dir1, double dir2, double tol);
+ static double eval(const QString & expr, double def = 0.0);
+ static bool cmpDouble(double v1, double v2, double tol = 0.001);
+ static double eval(const QString & expr, bool * ok);
+ static QString doubleToString(double value, double prec);
+ static QString doubleToString(double value, int prec);
- static void test();
+ static void test();
};
#endif // __MATHEXTRA_H__