diff options
author | Petr Nejedly <pnejedly@blackberry.com> | 2013-07-24 08:13:18 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-26 14:06:15 +0200 |
commit | 88054e44722c9fd5aab90928ee8052ee054053a3 (patch) | |
tree | af967a4fc80b9772ddc2f2b06b24f6f754c948aa /src/particles/qquickpointattractor.cpp | |
parent | 07860794da5863610f38295c9d517fc457c5de95 (diff) |
std:: fixes to make qtdeclarative closer to compilable with QNX NDK.
Math functions come in std:: when #included through <cmath>
Change-Id: I62550e5c23cb6f4464f2c2f5c4188a91b3512d1a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/particles/qquickpointattractor.cpp')
-rw-r--r-- | src/particles/qquickpointattractor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/particles/qquickpointattractor.cpp b/src/particles/qquickpointattractor.cpp index 8d8de21837..4d5d5c5247 100644 --- a/src/particles/qquickpointattractor.cpp +++ b/src/particles/qquickpointattractor.cpp @@ -119,8 +119,8 @@ bool QQuickAttractorAffector::affectParticle(QQuickParticleData *d, qreal dt) return false; qreal dx = m_x+m_offset.x() - d->curX(); qreal dy = m_y+m_offset.y() - d->curY(); - qreal r = sqrt((dx*dx) + (dy*dy)); - qreal theta = atan2(dy,dx); + qreal r = std::sqrt((dx*dx) + (dy*dy)); + qreal theta = std::atan2(dy,dx); qreal ds = 0; switch (m_proportionalToDistance){ case InverseQuadratic: @@ -139,8 +139,8 @@ bool QQuickAttractorAffector::affectParticle(QQuickParticleData *d, qreal dt) ds = m_strength; } ds *= dt; - dx = ds * cos(theta); - dy = ds * sin(theta); + dx = ds * std::cos(theta); + dy = ds * std::sin(theta); qreal vx,vy; switch (m_physics){ case Position: |