[TD]fix compile error on Win re M_PI
This commit is contained in:
@@ -21,6 +21,12 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifdef FC_OS_WIN32
|
||||
#define _USE_MATH_DEFINES //re Windows & M_PI issues
|
||||
#endif
|
||||
#include <cmath>
|
||||
|
||||
#ifndef _PreComp_
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <TopoDS_Compound.hxx>
|
||||
@@ -36,7 +42,6 @@
|
||||
# include <QPaintDevice>
|
||||
# include <QSvgGenerator>
|
||||
|
||||
# include <cmath>
|
||||
#endif
|
||||
|
||||
#include <App/Application.h>
|
||||
@@ -2271,4 +2276,20 @@ void QGIViewDimension::setPens(void)
|
||||
aHead2->setWidth(m_lineWidth);
|
||||
}
|
||||
|
||||
double QGIViewDimension::toDeg(double a)
|
||||
{
|
||||
return a*180/M_PI;
|
||||
}
|
||||
|
||||
double QGIViewDimension::toQtRad(double a)
|
||||
{
|
||||
return -a;
|
||||
}
|
||||
|
||||
double QGIViewDimension::toQtDeg(double a)
|
||||
{
|
||||
return -a*180.0/M_PI;
|
||||
}
|
||||
|
||||
|
||||
#include <Mod/TechDraw/Gui/moc_QGIViewDimension.cpp>
|
||||
|
||||
@@ -271,9 +271,9 @@ private:
|
||||
{ return QRectF(Rez::guiX(r.MinX), -Rez::guiX(r.MaxY),
|
||||
Rez::guiX(r.Width()), Rez::guiX(r.Height())); }
|
||||
|
||||
static inline double toDeg(double a) { return a*180/M_PI; }
|
||||
static inline double toQtRad(double a) { return -a; }
|
||||
static inline double toQtDeg(double a) { return -a*180.0/M_PI; }
|
||||
static double toDeg(double a);
|
||||
static double toQtRad(double a);
|
||||
static double toQtDeg(double a);
|
||||
|
||||
double getDefaultExtensionLineOverhang() const;
|
||||
double getDefaultArrowTailLength() const;
|
||||
|
||||
Reference in New Issue
Block a user