MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / attenuateLinearDistance

Function attenuateLinearDistance

extlibs/soloud/src/core/soloud_core_3d.cpp:163–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161 }
162
163 float attenuateLinearDistance(float aDistance, float aMinDistance, float aMaxDistance, float aRolloffFactor)
164 {
165 float distance = MAX(aDistance, aMinDistance);
166 distance = MIN(distance, aMaxDistance);
167 return 1 - aRolloffFactor * (distance - aMinDistance) / (aMaxDistance - aMinDistance);
168 }
169
170 float attenuateExponentialDistance(float aDistance, float aMinDistance, float aMaxDistance, float aRolloffFactor)
171 {

Callers 1

update3dVoicesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected