Refactoring. Better name.

--HG--
branch : release
This commit is contained in:
Roman Telezhynskyi 2015-05-07 11:49:56 +03:00
parent 16232eba92
commit 24ee7c1960
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

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

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*/)
{