From 267d38cf2057bb78f5d03c7f923573d1da2c84be Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 28 Apr 2012 03:58:58 -0700 Subject: Flip the parameters to aluCart2LUTpos, so it behaves a bit more like atan2 --- Alc/panning.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Alc/panning.c') diff --git a/Alc/panning.c b/Alc/panning.c index 3d82f9fe..0e09bc5c 100644 --- a/Alc/panning.c +++ b/Alc/panning.c @@ -150,10 +150,10 @@ static ALfloat aluLUTpos2Angle(ALint pos) return aluAtan((ALfloat)(pos - 3 * QUADRANT_NUM) / (ALfloat)(4 * QUADRANT_NUM - pos)) - F_PI_2; } -ALint aluCart2LUTpos(ALfloat re, ALfloat im) +ALint aluCart2LUTpos(ALfloat im, ALfloat re) { ALint pos = 0; - ALfloat denom = aluFabs(re) + aluFabs(im); + ALfloat denom = aluFabs(im) + aluFabs(re); if(denom > 0.0f) pos = (ALint)(QUADRANT_NUM*aluFabs(im) / denom + 0.5); -- cgit v1.2.3