Several useful constans.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-09-06 17:48:28 +03:00
parent cbd2e4a912
commit c622d173dd
3 changed files with 29 additions and 23 deletions

View File

@ -39,25 +39,6 @@
#endif // _MSC_VER > 1000
#endif // Q_CC_MSVC
#ifdef _WIN32
#undef M_PI
#define M_PI 3.14159265358979323846
QT_WARNING_DISABLE_MSVC(4800)
#endif
#ifndef M_PI
#define M_PI 3.14159265358979323846 /* pi */
#endif
#ifndef M_2PI
#define M_2PI 6.28318530717958647692 /* 2*pi */
#endif
#ifndef M_PI_2
#define M_PI_2 1.57079632679489661923 /* pi/2 */
#endif
#define DL_DXF_MAXLINE 1024
#define DL_DXF_MAXGROUPCODE 1100

View File

@ -38,15 +38,12 @@
#include <QtGlobal>
#include "../ifc/ifcdef.h"
#include "../vmisc/vmath.h"
#include "vgeometrydef.h"
#include "vgobject.h"
class QPointF;
#ifndef M_2PI
#define M_2PI 6.28318530717958647692528676655900576
#endif
enum class PathDirection : char { Hide, Show };
class QLineF;

View File

@ -48,5 +48,33 @@ Q_DECL_CONSTEXPR inline double qRadiansToDegrees(double radians)
#endif // QT_VERSION < QT_VERSION_CHECK(5, 1, 0)
#ifndef M_2PI
#define M_2PI (6.28318530717958647692) /* 2*pi */
#endif
#ifndef M_3PI_4
#define M_3PI_4 (2.35619449019234492884) /* 3*pi/4 */
#endif
#ifndef M_3PI_8
#define M_3PI_8 (1.17809724509617246442) /* 3*pi/8 */
#endif
#ifndef M_PI_8
#define M_PI_8 (0.39269908169872415480) /* pi/8 */
#endif
#ifndef M_4_PI
#define M_4_PI (1.27323954473516268615) /* 4/pi */
#endif
#ifndef M_1_SQRT2
#define M_1_SQRT2 (0.70710678118654752440) /* 1/sqrt(2) */
#endif
#ifndef M_EULER
#define M_EULER (0.57721566490153286060)
#endif
#endif // VMATH_H