summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/slang/library/slang_common_builtin.gc2
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 {