Refactoring. Better name.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-05-07 11:49:56 +03:00
parent c98aa9487e
commit 01475d4122
3 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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;

View File

@ -107,8 +107,8 @@ QPointF VToolPointOfContact::FindPoint(const qreal &radius, const QPointF &cente
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*/)
{