Mercurial > projects > qtd
comparison qt/d2/qt/core/QPoint.d @ 325:b460cd08041f signals
dmd 2.037 opEquals bug-feature
author | eldar1@eldar1-laptop |
---|---|
date | Wed, 30 Dec 2009 11:25:07 +0000 |
parents | 463563fc9e17 |
children |
comparison
equal
deleted
inserted
replaced
324:0cc996b7a601 | 325:b460cd08041f |
---|---|
59 { xp-=p.xp; yp-=p.yp; return this; } | 59 { xp-=p.xp; yp-=p.yp; return this; } |
60 | 60 |
61 QPoint opMulAssign(qreal c) | 61 QPoint opMulAssign(qreal c) |
62 { xp = qRound(xp*c); yp = qRound(yp*c); return this; } | 62 { xp = qRound(xp*c); yp = qRound(yp*c); return this; } |
63 | 63 |
64 bool opEquals(ref QPoint p) | 64 bool opEquals(ref const QPoint p) const |
65 { return xp == p.xp && yp == p.yp; } | 65 { return xp == p.xp && yp == p.yp; } |
66 | 66 |
67 QPoint opAdd(ref QPoint p) | 67 QPoint opAdd(ref QPoint p) |
68 { return QPoint(this.xp+p.xp, this.yp+p.yp); } | 68 { return QPoint(this.xp+p.xp, this.yp+p.yp); } |
69 | 69 |
182 { xp-=p.xp; yp-=p.yp; return this; } | 182 { xp-=p.xp; yp-=p.yp; return this; } |
183 | 183 |
184 QPointF opMulAssign(qreal c) | 184 QPointF opMulAssign(qreal c) |
185 { xp*=c; yp*=c; return this; } | 185 { xp*=c; yp*=c; return this; } |
186 | 186 |
187 bool opEquals(ref QPointF p) | 187 bool opEquals(ref const QPointF p) const |
188 { return qFuzzyCompare(xp, p.xp) && qFuzzyCompare(yp, p.yp); } | 188 { return qFuzzyCompare(xp, p.xp) && qFuzzyCompare(yp, p.yp); } |
189 | 189 |
190 QPointF opAdd(ref QPointF p) | 190 QPointF opAdd(ref QPointF p) |
191 { return QPointF(this.xp+p.xp, this.yp+p.yp); } | 191 { return QPointF(this.xp+p.xp, this.yp+p.yp); } |
192 | 192 |