glsl: fix atan(0, -1)

Fixes fd.o bug 29388

NOTE: this is a candidate for the 7.8 branch.
This commit is contained in:
Brian Paul 2010-08-05 16:38:22 -06:00
parent 918ef7ff18
commit 3d038a3ed2

View file

@ -411,7 +411,7 @@ float atan(const float y, const float x)
if (abs(x) > 1.0e-4) {
r = atan(y / x);
if (x < 0.0) {
r = r + sign(y) * 3.141593;
r = r + 3.141593 - 6.283186 * float(y < 0.0);
}
}
else {