9#include <private/qnumeric_p.h>
244#ifndef QT_NO_DEBUG_STREAM
248 dbg.nospace() <<
"QLine(" <<
p.p1() <<
',' <<
p.p2() <<
')';
253#ifndef QT_NO_DATASTREAM
571 const qreal theta_normalized = theta < 0 ? theta + 360 : theta;
576 return theta_normalized;
599 pt2.
rx() = pt1.
x() +
dx;
600 pt2.
ry() = pt1.
y() +
dy;
635 if (
qAbs(
f.length() - 1) >= 0.001)
636 qWarning(
"QLine::unitVector: New line does not have unit length");
660 const qreal denominator =
a.
y() *
b.x() -
a.x() *
b.y();
664 const qreal reciprocal = 1 / denominator;
665 const qreal na = (
b.y() *
c.x() -
b.x() *
c.y()) * reciprocal;
666 if (intersectionPoint)
667 *intersectionPoint = pt1 +
a * na;
669 if (na < 0 || na > 1)
672 const qreal nb = (
a.x() *
c.y() -
a.y() *
c.x()) * reciprocal;
673 if (nb < 0 || nb > 1)
782 const qreal delta_normalized = delta < 0 ? delta + 360 : delta;
787 return delta_normalized;
809#ifndef QT_NO_DEBUG_STREAM
813 dbg.nospace() <<
"QLineF(" <<
p.p1() <<
',' <<
p.p2() <<
')';
818#ifndef QT_NO_DATASTREAM
\inmodule QtCore\reentrant
\inmodule QtCore\compares equality \compareswith equality QLine \endcompareswith
constexpr QPointF p1() const
Returns the line's start point.
QDataStream & operator>>(QDataStream &stream, QLineF &line)
Reads a line from the given stream into the given line and returns a reference to the stream.
constexpr bool isNull() const
Returns true if the line does not have distinct start and end points; otherwise returns false.
void setAngle(qreal angle)
friend constexpr bool qFuzzyCompare(const QLineF &lhs, const QLineF &rhs) noexcept
constexpr qreal dx() const
Returns the horizontal component of the line's vector.
constexpr qreal dy() const
Returns the vertical component of the line's vector.
constexpr QLineF()
Constructs a null line.
QDataStream & operator<<(QDataStream &stream, const QLineF &line)
Writes the given line to the given stream and returns a reference to the stream.
qreal angleTo(const QLineF &l) const
QLineF unitVector() const
Returns the unit vector for this line, i.e a line starting at the same point as this line with a leng...
qreal length() const
Returns the length of the line.
IntersectionType
\typealias QLineF::IntersectType
IntersectionType intersects(const QLineF &l, QPointF *intersectionPoint=nullptr) const
static QLineF fromPolar(qreal length, qreal angle)
\inmodule QtCore\compares equality \compareswith equality QLineF \endcompareswith
QDataStream & operator<<(QDataStream &stream, const QLine &line)
Writes the given line to the given stream and returns a reference to the stream.
QDataStream & operator>>(QDataStream &stream, QLine &line)
Reads a line from the given stream into the given line and returns a reference to the stream.
\inmodule QtCore\reentrant
constexpr qreal & ry() noexcept
Returns a reference to the y coordinate of this point.
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
constexpr qreal & rx() noexcept
Returns a reference to the x coordinate of this point.
\inmodule QtCore\reentrant
Combined button and popup list for selecting options.
auto qHypot(qfloat16 x, qfloat16 y)
QDebug operator<<(QDebug dbg, const QLine &p)
constexpr float qRadiansToDegrees(float radians)
constexpr float qDegreesToRadians(float degrees)
constexpr T qAbs(const T &t)
static Q_DECL_CONST_FUNCTION bool qt_is_finite(double d)
GLboolean GLboolean GLboolean b
GLint GLint GLint GLint GLint x
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLenum GLsizei length