compile when qreal is a float
authorGunnar Sletta <gunnar.sletta@nokia.com>
Thu, 28 Jul 2011 11:26:51 +0000 (13:26 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 28 Jul 2011 11:27:59 +0000 (13:27 +0200)
Change-Id: I1e5c592f1cacb0a3a80e15b53011efb134db29f7
Reviewed-on: http://codereview.qt.nokia.com/2336
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
src/declarative/particles/qsgtargetaffector.cpp

index e7bbebe..d84bd4d 100644 (file)
@@ -76,7 +76,7 @@ bool QSGTargetAffector::affectParticle(QSGParticleData *d, qreal dt)
     qreal vY = (target.y() - d->y) / tt;
 
     qreal w = 1 - (t / tt) + 0.05;
-    w = qMin(w, 1.0);
+    w = qMin<qreal>(w, 1.0);
     qreal wvX = vX * w + d->vx * (1 - w);
     qreal wvY = vY * w + d->vy * (1 - w);
     //Screws with the acceleration so that the given start pos with the chosen weighted velocity will still end at the target coordinates