Fix compilation after the qreal->float change in Math3D
QVector3D::length() returns float now, so this qBound call was running into template substitution failure. Change-Id: Ib03ab96bf18a4b04fa80a8f706761329faab2541 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
d62b1c5213
commit
1450569eb1
@@ -379,6 +379,6 @@ void QDeclarativeAttenuationModelInverse::setRolloffFactor(qreal rolloffFactor)
|
||||
qreal QDeclarativeAttenuationModelInverse::calculateGain(const QVector3D &listenerPosition, const QVector3D &sourcePosition) const
|
||||
{
|
||||
Q_ASSERT(m_ref > 0);
|
||||
return m_ref / (m_ref + (qBound(m_ref, (listenerPosition - sourcePosition).length(), m_max) - m_ref) * m_rolloff);
|
||||
return m_ref / (m_ref + (qBound<qreal>(m_ref, (listenerPosition - sourcePosition).length(), m_max) - m_ref) * m_rolloff);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user