aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-10-12 07:10:51 -0700
committerChris Robinson <[email protected]>2012-10-12 07:10:51 -0700
commit25b8a95987a714263859d004a9be0cc504a976e4 (patch)
treeecbe52e603374e254b25f2fc5680a49e9af15d66 /Alc/ALu.c
parent99fcd6f816c125ebb45905f4adf7a423e860e561 (diff)
Check the distance against epsilon to determine if it matches
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 5c897927..6afd5e4c 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -732,7 +732,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
/* Use a binaural HRTF algorithm for stereo headphone playback */
ALfloat delta, ev = 0.0f, az = 0.0f;
- if(Distance > 0.0f)
+ if(Distance > FLT_EPSILON)
{
ALfloat invlen = 1.0f/Distance;
Position[0] *= invlen;
@@ -797,7 +797,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
}
/* Normalize the length, and compute panned gains. */
- if(Distance > 0.0f)
+ if(Distance > FLT_EPSILON)
{
ALfloat invlen = 1.0f/Distance;
Position[0] *= invlen;