diff options
author | Brian Paul <[email protected]> | 2010-08-05 16:38:22 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-08-05 16:39:09 -0600 |
commit | 3d038a3ed2d8325c4b826f13b62398b3ed33f3ba (patch) | |
tree | 1e20b85d7aac634638fe445c4c2f03a2eb85ec6e /src/mesa | |
parent | 918ef7ff18dc407d8ab1d6dc9cfb1267618c6534 (diff) |
glsl: fix atan(0, -1)
Fixes fd.o bug 29388
NOTE: this is a candidate for the 7.8 branch.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/slang/library/slang_common_builtin.gc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/slang/library/slang_common_builtin.gc b/src/mesa/slang/library/slang_common_builtin.gc index d75354deffe..1f5ddbc1ee2 100644 --- a/src/mesa/slang/library/slang_common_builtin.gc +++ b/src/mesa/slang/library/slang_common_builtin.gc @@ -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 { |