X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Fmathextra.h;fp=src%2Fbase%2Fmathextra.h;h=0000000000000000000000000000000000000000;hb=9f6ad3fe0b9cb30115a5d38e8af3aebed0d70c08;hp=d772b3fb3d97a01f874baa64332a0f25cce61eba;hpb=43c13b052d069ba435277d93867380d00c04931f;p=architektonas diff --git a/src/base/mathextra.h b/src/base/mathextra.h deleted file mode 100644 index d772b3f..0000000 --- a/src/base/mathextra.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef __MATHEXTRA_H__ -#define __MATHEXTRA_H__ - -#include - -#define ARAD 57.29577951308232 -#define RS_TOLERANCE 1.0e-10 -#define RS_TOLERANCE_ANGLE 1.0e-8 - -/** - * Math functions. - */ -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); - - static void test(); -}; - -#endif // __MATHEXTRA_H__