Refactoring.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-02-22 10:58:16 +02:00
parent e688111414
commit 8f994f3de6

View File

@ -67,13 +67,8 @@ void VToolTrueDarts::FindPoint(const QPointF &baseLineP1, const QPointF &baseLin
QLineF d2blP2(dartP2, baseLineP2); QLineF d2blP2(dartP2, baseLineP2);
d2blP2.setAngle(d2blP2.angle()+degrees); d2blP2.setAngle(d2blP2.angle()+degrees);
const QPointF bP2Temp = d2blP2.p2();
const QLineF bP1bP2Temp(baseLineP1, bP2Temp); if (QLineF(baseLineP1, d2blP2.p2()).intersect(d2d1, &p1) == QLineF::NoIntersection)
const QLineF::IntersectType res = bP1bP2Temp.intersect(d2d1, &p1);
if (res == QLineF::NoIntersection)
{ {
p1 = QPointF(0, 0); p1 = QPointF(0, 0);
p2 = QPointF(0, 0); p2 = QPointF(0, 0);