Refactoring. Better name.
--HG-- branch : release
This commit is contained in:
parent
16232eba92
commit
24ee7c1960
|
@ -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);
|
||||
|
|
|
@ -352,7 +352,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