9#include <private/qnumeric_p.h>
241#ifndef QT_NO_DEBUG_STREAM
245 dbg.nospace() <<
"QLine(" <<
p.p1() <<
',' <<
p.p2() <<
')';
250#ifndef QT_NO_DATASTREAM
565 const qreal theta_normalized = theta < 0 ? theta + 360 : theta;
570 return theta_normalized;
593 pt2.
rx() = pt1.
x() +
dx;
594 pt2.
ry() = pt1.
y() +
dy;
629 if (
qAbs(
f.length() - 1) >= 0.001)
630 qWarning(
"QLine::unitVector: New line does not have unit length");
654 const qreal denominator =
a.
y() *
b.x() -
a.x() *
b.y();
658 const qreal reciprocal = 1 / denominator;
659 const qreal na = (
b.y() *
c.x() -
b.x() *
c.y()) * reciprocal;
660 if (intersectionPoint)
661 *intersectionPoint = pt1 +
a * na;
663 if (na < 0 || na > 1)
666 const qreal nb = (
a.x() *
c.y() -
a.y() *
c.x()) * reciprocal;
667 if (nb < 0 || nb > 1)
776 const qreal delta_normalized = delta < 0 ? delta + 360 : delta;
781 return delta_normalized;
784#ifndef QT_NO_DEBUG_STREAM
788 dbg.nospace() <<
"QLineF(" <<
p.p1() <<
',' <<
p.p2() <<
')';
793#ifndef QT_NO_DATASTREAM
\inmodule QtCore\reentrant
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)
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)
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.
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
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