Details
-
Task
-
Resolution: Done
-
Not Evaluated
-
None
-
1575462bf90851fb134db4892e93c04b396543f1
Description
Suggestion:
For function void QLineF::setLength ( qreal length ) ,
In the document, didn't metion about if length is a negative value, effect the angle value or not.
Source code:
QLineF line = QLineF(0, 0, 1.0, 1.0);
qDebug(QString::number(line.angle()).toLatin1());
line.setLength(-2);
qDebug(QString("Output p2 = (" + QString::number(line.p2().x()) + ",\t" + QString::number(line.p2().y()) + ")").toLatin1());
qDebug(QString::number(line.angle()).toLatin1());
Output:
315
Output p2 = (-1.41421, -1.41421)
135
Reason:
In the document, didn't metion about if length is a negative value, effect the angle value or not.