| 154 | } |
| 155 | |
| 156 | float attenuateInvDistance(float aDistance, float aMinDistance, float aMaxDistance, float aRolloffFactor) |
| 157 | { |
| 158 | float distance = MAX(aDistance, aMinDistance); |
| 159 | distance = MIN(distance, aMaxDistance); |
| 160 | return aMinDistance / (aMinDistance + aRolloffFactor * (distance - aMinDistance)); |
| 161 | } |
| 162 | |
| 163 | float attenuateLinearDistance(float aDistance, float aMinDistance, float aMaxDistance, float aRolloffFactor) |
| 164 | { |