The QVector2D class represents a vector or vertex(顶点,例如三角形的一个顶点) in 2D space.
The QVector2D class can also be used to represent vertices in 2D space. We therefore do not need to provide a separate vertex class.
Note: By design values in the QVector2D instance are stored as float. This means that on platforms where the qreal arguments to QVector2D functions are represented by double values, it is possible to lose precision(精度不够).
QVector2D ()
QVector2D ( qreal xpos, qreal ypos )
QVector2D ( const QPoint & point )
QVector2D ( const QPointF & point )
QVector2D ( const QVector3D & vector )
QVector2D ( const QVector4D & vector )
bool isNull () const
qreal length () const
qreal lengthSquared () const
void normalize ()
QVector2D normalized () const
void setX ( qreal x )
void setY ( qreal y )
QPoint