Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

const QPoint operator/ ( const QPoint point,
qreal  divisor 
) [friend]

Returns the QPoint formed by dividing both components of the given point by the given divisor.

Note that the result is rounded to the nearest integer as points are held as integers. Use QPointF for floating point accuracy.

See also:
QPoint::operator/=()

Definition at line 175 of file qpoint.h.

{
    Q_ASSERT(!qFuzzyCompare(c, 0));
    return QPoint(qRound(p.xp/c), qRound(p.yp/c));
}


Generated by  Doxygen 1.6.0   Back to index