error: use of undeclared identifier 'sqrt'.
--HG-- branch : develop
This commit is contained in:
parent
3590ebac74
commit
fc083fc667
|
@ -34,6 +34,7 @@
|
||||||
#include "../geometry/vpointf.h"
|
#include "../geometry/vpointf.h"
|
||||||
#include "../undocommands/savetooloptions.h"
|
#include "../undocommands/savetooloptions.h"
|
||||||
#include "../widgets/vmaingraphicsview.h"
|
#include "../widgets/vmaingraphicsview.h"
|
||||||
|
#include <QtCore/qmath.h>
|
||||||
|
|
||||||
const QString VAbstractTool::AttrType = QStringLiteral("type");
|
const QString VAbstractTool::AttrType = QStringLiteral("type");
|
||||||
const QString VAbstractTool::AttrMx = QStringLiteral("mx");
|
const QString VAbstractTool::AttrMx = QStringLiteral("mx");
|
||||||
|
@ -205,7 +206,7 @@ qint32 VAbstractTool::LineIntersectCircle(const QPointF ¢er, qreal radius, c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// find distance from projection to points of intersection
|
// find distance from projection to points of intersection
|
||||||
qreal k = sqrt (radius * radius - d * d);
|
qreal k = qSqrt (radius * radius - d * d);
|
||||||
qreal t = QLineF (QPointF (0, 0), QPointF (b, - a)).length();
|
qreal t = QLineF (QPointF (0, 0), QPointF (b, - a)).length();
|
||||||
// add to projection a vectors aimed to points of intersection
|
// add to projection a vectors aimed to points of intersection
|
||||||
p1 = addVector (p, QPointF (0, 0), QPointF (- b, a), k / t);
|
p1 = addVector (p, QPointF (0, 0), QPointF (- b, a), k / t);
|
||||||
|
|
|
@ -99,7 +99,7 @@ QPointF VisLine::Ray(const QPointF &firstPoint, const qreal &angle) const
|
||||||
line.setAngle(angle);
|
line.setAngle(angle);
|
||||||
|
|
||||||
QRectF scRect = this->scene()->sceneRect();
|
QRectF scRect = this->scene()->sceneRect();
|
||||||
qreal diagonal = sqrt(pow(scRect.height(), 2) + pow(scRect.width(), 2));
|
qreal diagonal = qSqrt(pow(scRect.height(), 2) + pow(scRect.width(), 2));
|
||||||
line.setLength(diagonal);
|
line.setLength(diagonal);
|
||||||
if (QGuiApplication::keyboardModifiers() == Qt::ShiftModifier)
|
if (QGuiApplication::keyboardModifiers() == Qt::ShiftModifier)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user