summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ir_print_visitor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp
index f85e573c43e..6ad22fe33e8 100644
--- a/src/glsl/ir_print_visitor.cpp
+++ b/src/glsl/ir_print_visitor.cpp
@@ -416,9 +416,9 @@ void ir_print_visitor::visit(ir_constant *ir)
if (ir->value.f[i] == 0.0f)
/* 0.0 == -0.0, so print with %f to get the proper sign. */
printf("%.1f", ir->value.f[i]);
- else if (abs(ir->value.f[i]) < 0.000001f)
+ else if (fabs(ir->value.f[i]) < 0.000001f)
printf("%a", ir->value.f[i]);
- else if (abs(ir->value.f[i]) > 1000000.0f)
+ else if (fabs(ir->value.f[i]) > 1000000.0f)
printf("%e", ir->value.f[i]);
else
printf("%f", ir->value.f[i]);