Refactoring. Better name.
--HG-- branch : develop
This commit is contained in:
parent
c98aa9487e
commit
01475d4122
|
@ -76,7 +76,7 @@ QVector<QPointF> VAbstractCurve::FromBegin(const QVector<QPointF> &points, const
|
|||
{
|
||||
if (theBegin == false)
|
||||
{
|
||||
if (PointInSegment(begin, points.at(i), points.at(i+1)))
|
||||
if (IsPointOnLineSegment(begin, points.at(i), points.at(i+1)))
|
||||
{
|
||||
theBegin = true;
|
||||
segment.append(begin);
|
||||
|
|
|
@ -353,7 +353,7 @@ void VGObject::LineCoefficients(const QLineF &line, qreal *a, qreal *b, qreal *c
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
bool VGObject::PointInSegment(const QPointF &t, const QPointF &p1, const QPointF &p2)
|
||||
bool VGObject::IsPointOnLineSegment(const QPointF &t, const QPointF &p1, const QPointF &p2)
|
||||
{
|
||||
const qreal eps = 1e-8;
|
||||
|
||||
|
|
|
@ -107,8 +107,8 @@ QPointF VToolPointOfContact::FindPoint(const qreal &radius, const QPointF ¢e
|
|||
break;
|
||||
case 2:
|
||||
{
|
||||
const bool flagP1 = VGObject::PointInSegment (p1, firstPoint, secondPoint);
|
||||
const bool flagP2 = VGObject::PointInSegment (p2, firstPoint, secondPoint);
|
||||
const bool flagP1 = VGObject::IsPointOnLineSegment (p1, firstPoint, secondPoint);
|
||||
const bool flagP2 = VGObject::IsPointOnLineSegment (p2, firstPoint, secondPoint);
|
||||
if ((flagP1 == true && flagP2 == true) ||
|
||||
(flagP1 == false && flagP2 == false)/*In case we have something wrong*/)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user